This file contains 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
find . -type d -name '.svn' -print -exec rm -rf {} \; |
This file contains 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
# if run as "tmux attach", create a session if one does not already exist | |
new-session -n $HOST | |
# shift arrows for panels | |
bind -n S-Left select-pane -L | |
bind -n S-Right select-pane -R | |
bind -n S-Up select-pane -U | |
bind -n S-Down select-pane -D | |
# alt arrows for windows |
This file contains 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 | |
export PASSPHRASE=1234 | |
FTP_URL="sftp://user@host:port/file" | |
BK_FULL_FREQ="1M" # create a new full backup every... | |
BK_FULL_LIFE="6M" # delete any backup older than this | |
BK_KEEP_FULL="2" # How many full+inc cycle to keep | |
function makebackup() { |
This file contains 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 | |
Blade::directive('fancytime', function ($time) { | |
return "<abbr title=\"<?php echo " . $time . "->format('d.m.Y H:i:s'); ?>\">" . | |
"<time datetime=\"<?php echo " . $time . "->toIso8601String(); ?>\">" . | |
"<?php echo " . $time . "->diffForHumans(); ?>" . | |
"</time>" . | |
"</abbr>"; | |
}); |
This file contains 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
gsettings set org.gnome.desktop.wm.preferences mouse-button-modifier "<Super>" |
This file contains 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
# gnome | |
alias go='nohup xdg-open 1>/dev/null 2>&1' | |
# apt | |
alias sai='sudo apt install' | |
alias sau='sudo apt update' | |
alias saa='sudo apt autoremove' | |
alias sadu='sudo apt dist-upgrade' | |
alias acs='apt-cache search' |
This file contains 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
[colors] | |
# ... | |
n5=Solarized,0,15,10,9,8,8,8,15,11,11,15,6,9,9,7,6,15,15,11,11,15,0,6,0,7,7,15,0,0,15 | |
[palettes] | |
# ... | |
n5=3552822,4342338,7695960,8616805,9868419,10592659,14018798,14939901,35253,1461195,3093212,8533715,12874092,13798182,10002730,39301 |
This file contains 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
local flags = {"tank", "dps", "healer", "heroic", "deadly", "important", "interruptible", "magic", "curse", "poison", "disease", "enrage", "enrage"} | |
local EJ_DIFF_N = 1 | |
local EJ_DIFF_HC = 2 | |
local EJ_DIFF_10 = 3 | |
local EJ_DIFF_25 = 4 | |
local EJ_DIFF_10HC = 5 | |
local EJ_DIFF_25HC = 6 | |
local EJ_DIFF_LFR = 7 | |
local EJ_DIFF_CHA = 8 |
This file contains 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
public double ColourDistance(Color c1, Color c2) | |
{ | |
double rmean = ( c1.getRed() + c2.getRed() )/2; | |
int r = c1.getRed() - c2.getRed(); | |
int g = c1.getGreen() - c2.getGreen(); | |
int b = c1.getBlue() - c2.getBlue(); | |
double weightR = 2 + rmean/256; | |
double weightG = 4.0; | |
double weightB = 2 + (255-rmean)/256; | |
return Math.sqrt(weightR*r*r + weightG*g*g + weightB*b*b); |
This file contains 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
package helpers; | |
/** | |
* This class formats general toString -string to more readable form | |
* | |
* Usage: | |
* ToString.print(object); | |
* | |
* @author Kehet | |
*/ |
NewerOlder