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
bash -c "path_exec=$(echo \"%1\" | sed 's/[[:space:]]\([A-Z]:\)/\n\1/g' | sed 's/[A-Z]:/\/mnt\/\L&/g' | tr '\\' '\/'\'); path_exec="${path_exec//:}"; scp \"$path_exec\" ubuntu:~; sleep 2" |
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
@echo off | |
cls | |
set x86="%SYSTEMROOT%\System32\OneDriveSetup.exe" | |
set x64="%SYSTEMROOT%\SysWOW64\OneDriveSetup.exe" | |
echo Closing OneDrive process. | |
echo. | |
taskkill /f /im OneDrive.exe > NUL 2>&1 | |
ping 127.0.0.1 -n 5 > NUL 2>&1 |
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
SELECT | |
TABLE_SCHEMA, TABLE_NAME, SUM(TABLE_ROWS) as row_count | |
FROM | |
INFORMATION_SCHEMA.TABLES | |
GROUP BY TABLE_SCHEMA , TABLE_NAME | |
HAVING row_count > 0 | |
ORDER BY row_count desc; |
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
namespace :db do | |
desc "Fix PostGres Sequences, should run after doing row level inserts." | |
task :fix_sequences => :environment do | |
def exec_sql(sql) | |
#puts "Executing SQL...\n#{sql}" | |
ActiveRecord::Base.connection.execute(sql) | |
end | |
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
<?php | |
function grouped_data_sorter($key) { | |
return function ($a, $b) use ($key) { | |
return strnatcmp($a[0]->$key, $b[0]->$key); | |
}; | |
} | |
uasort($grouped_data, grouped_data_sorter('total_users')); |
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
for i in `git status | grep deleted | awk '{print $3}'`; do git rm $i; done |
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
" Folding | |
hi Folded guibg=red guifg=Red cterm=bold ctermbg=DarkGrey ctermfg=lightblue | |
hi FoldColumn guibg=grey78 gui=Bold guifg=DarkBlue | |
set foldclose= | |
set foldmethod=indent | |
set foldnestmax=10 | |
set foldlevel=0 | |
set fillchars=vert:\|,fold:\ | |
set foldminlines=2 |
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
#!/bin/bash | |
#MySQL Backup | |
MyUSER="" | |
MyPASS="" | |
MyHOST="" | |
MYSQL="$(which mysql)" | |
MYSQLDUMP="$(which mysqldump)" | |
CHOWN="$(which chown)" |
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
; Use Scroll Lock to swap keyboard layouts | |
; and do not let Control, Alt, or Win modifiers act on Dvorak | |
Loop { | |
If GetKeyState("ScrollLock", "T") | |
and !GetKeyState("Control") | |
and !GetKeyState("Alt") | |
and !GetKeyState("LWin") | |
and !GetKeyState("RWin") { | |
Suspend, Off | |
} else { |