Skip to content

Instantly share code, notes, and snippets.

View FirePanther's full-sized avatar
👨‍💻
hi ✌️

Suat Secmen FirePanther

👨‍💻
hi ✌️
View GitHub Profile
@FirePanther
FirePanther / finderHideBurn.sh
Last active November 17, 2016 03:41
Hide "Burn to disc" on OS X Finders context menu. Write this command into your Terminal
defaults write com.apple.finder ProhibitBurn -bool YES && killall Finder
@FirePanther
FirePanther / safariSearchMatchFull.sh
Last active November 17, 2016 03:43
Fix Safari "Search by words", no Safari restart/reload needed. Write this command into your Terminal
defaults write com.apple.Safari FindOnPageMatchesWordStartsOnly -bool false
@FirePanther
FirePanther / itermOpenSidebar.applescript
Last active November 17, 2016 03:53
Start an iTerm Sidebar on second display
tell application "System Events"
tell application "iTerm" to activate
delay 0.5
keystroke "t" using {command down, option down, control down}
tell application "iTerm" to terminate the first session of the first terminal
end tell
@FirePanther
FirePanther / backup-push.sh
Created April 11, 2015 23:45
Backup Cydia package list and sources
#!/bin/bash
cd /User/Documents/FireCloud/BackUp
git push origin master
@FirePanther
FirePanther / countChars.applescript
Last active November 17, 2016 03:51
Count Selected Characters and Words
on run {input, parameters}
set w to count words of (input as string)
set ws to "s"
if w = 1 then set ws to ""
set c to count characters of (input as string)
set cs to "s"
if c = 1 then set cs to ""
display dialog (c & " character" & cs & " (" & w & " word" & ws & ") in the selected text." as string) buttons {"Close"}
end run
@FirePanther
FirePanther / integerToString.js
Last active November 17, 2016 03:50
Generator string by the codec chars
function int2str(integer, codec) {
var clen = codec.length, string = "", mod;
while (integer > 0) {
mod = integer % clen;
string = codec[mod] + string;
integer = (integer - mod) / clen;
}
return string;
}
#!/bin/bash
i=0
for i in `seq 1 10`; do
starttime=`gdate +%s%3N`
start=`gdate +%s -r "$HOME/Library/Application Support/Alfred 2/Databases/clipboard.alfdb"`
echo `gdate +%s%3N` | pbcopy
until [ start != current ]; do
current=`gdate +%s -r "$HOME/Library/Application Support/Alfred 2/Databases/clipboard.alfdb"`
done
endtime=`gdate +%s%3N`
@FirePanther
FirePanther / codaHideDotfilesException.regex
Last active November 17, 2016 03:45
Coda2: hide dot files on $HOME but show .bash_... files (don't show bash_sessions)
hide all files whose Path matches:
.*/Users/[^\/]+/(\.bash_sessions|\.((?!bash_).)*|npm\-debug\.log)
public static boolean prim(int zahl) {
if (zahl == 2) return true;
else if (zahl == 1 || zahl % 2 == 0) return false;
else {
for(int i = 3; i <= Math.ceil(Math.sqrt(zahl)); i += 2) {
if (zahl % i == 0) return false;
}
return true;
}
}
@FirePanther
FirePanther / parseYoutubemails.js
Last active November 17, 2016 04:10
Parses YouTube Mails, sende them to a Server to Download the videos
function myFunction() {
var labelName = "YouTube",
label = GmailApp.getUserLabelByName(labelName),
threads = label.getThreads(),
msg, match, date, now = new Date(), afterTime = 1000 * 60 * 60;
Logger.log("Threads: " + threads.length);
for (var x in threads) {
Logger.log("Found thread: " + threads[x].getFirstMessageSubject());
msg = threads[x].getMessages();
match = msg[0].getPlainBody().match(/watch\?v=(.*?)\&/);