This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # One-way synchronization of dotfiles | |
| $wslUser = "username" | |
| # Define the repositories and their corresponding file copy operations | |
| $repositories = @( | |
| @{ | |
| # VSC | |
| Path = "C:\path\to\repository1" | |
| FilesToCopy = @( | |
| @{ Source = "keybindings.json"; Destination = "C:\Users\$env:USERNAME\AppData\Roaming\Code\User\keybindings.json" }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # enable color support of ls and also add handy aliases | |
| if [ -x /usr/bin/dircolors ]; then | |
| test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" | |
| alias ls='ls --color=auto' | |
| alias dir='dir --color=auto' | |
| alias vdir='vdir --color=auto' | |
| alias grep='grep --color=auto' | |
| alias fgrep='fgrep --color=auto' | |
| alias egrep='egrep --color=auto' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import json | |
| import pandas as pd | |
| def save_dataframes_to_json(dataframes_dict, file_name): | |
| data_dict = {} | |
| for key, value in dataframes_dict.items(): | |
| data_dict[key] = value.to_dict(orient='records') | |
| with open(file_name, 'w') as f: | |
| json.dump(data_dict, f, default=str) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library(pdftools) | |
| # you can use an url or a path | |
| pdf_url <- "https://cran.r-project.org/web/packages/pdftools/pdftools.pdf" | |
| # `pdf_text` converts it to a list | |
| list_output <- pdftools::pdf_text(pdf_url) | |
| print(list_output) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Sub ListFilesFolder() | |
| 'na podstawie przykładu od MVP OShon z VBATools.pl | |
| Dim ob As Object, pliki As Object, plik As Object | |
| Dim folder As Object, sciezka$, r&: r = 2 ' $ i & to skrócone deklaracje typu zmiennych! | |
| sciezka = SelectFolder | |
| Cells(1, 1) = "nazwa pliku" | |
| Cells(1, 2) = "plik ze ścieżka" | |
| Cells(1, 3) = "rozmiar" | |
| Cells(1, 4) = "rodzaj" | |
| Cells(1, 5) = "utworzono" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| import time | |
| # stworzenie listy plików | |
| folder_path ='C:/Users/Paweł/Downloads/' | |
| files = os.listdir(folder_path) | |
| # odczyt zawartość kolejnych plików w pętli i ich przeniesienie | |
| for file in files: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| month_end_date <- function(my_date) { | |
| next_month_date <- c() | |
| next_month_date[1] <- substr(my_date,1,4) | |
| next_month_date[2] <- as.character(sprintf("%02d",as.integer(substr(my_date,6,7))+1)) | |
| next_month_date[3] <- "01" #substr(my_date,9,10) | |
| if (as.integer(next_month_date[2])>=12){ | |
| next_month_date[1] <- as.character(as.integer(next_month_date[1])+1) | |
| next_month_date[2] <- "01" | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // # Dodać do Chrome jako dodatek w "Trybie developera" | |
| // ===UserScript=== | |
| // @name Bookmark Launcher | |
| // @description Launches bookmarks with keyboard shortcuts | |
| // ===/UserScript=== | |
| // 'javascript:var tabindex = 0;function next(){ var tab = document.getElementsByClassName("fl"); tab[tabindex].focus(); if(tabindex == tab.length -1){ tabindex = 0; } else{ tabindex ++; }}'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Option Explicit | |
| 'deklaracja funkcji Windows API z https://docs.microsoft.com/en-us/office/vba/access/Concepts/Windows-API/send-information-to-the-clipboard | |
| ' dla wersji 32-bit | |
| 'Private Declare Function OpenClipboard Lib "user32.dll" (ByVal hWnd As Long) As Long | |
| 'Private Declare Function EmptyClipboard Lib "user32.dll" () As Long | |
| 'Private Declare Function CloseClipboard Lib "user32.dll" () As Long | |
| ''-- | |
| 'Private Declare Function IsClipboardFormatAvailable Lib "user32.dll" (ByVal wFormat As Long) As Long | |
| 'Private Declare Function GetClipboardData Lib "user32.dll" (ByVal wFormat As Long) As Long | |
| ''-- |