title | tags | authors | |||||
---|---|---|---|---|---|---|---|
How to keep in sync your Git repos on GitHub, GitLab & Bitbucket easily |
|
|
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
# 05_h.png >> 05_half.png | |
for file in *.png; do mv "$file" "${file/_h.png/_half.png}"; echo $f;done | |
# * >> *.mp4 | |
for file in *; do mv "$file" "$file.mp4";done | |
# */*/ -rec >> remove *.pdf && *.doc | |
IFS=$'\n'; set -f ## To skip problem of directories with spaces | |
for f in $(find . -name '*.pdf' -or -name '*.doc'); do rm "$f"; echo $f;done | |
unset IFS; set +f |
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
import java.util.Locale; | |
/** | |
* Class representing UTM-coordinates. Based on code from stack overflow. | |
* @see <a href="https://stackoverflow.com/questions/176137/java-convert-lat-lon-to-utm">Stack Overflow</a> | |
* @see <a href="https://en.wikipedia.org/wiki/Universal_Transverse_Mercator_coordinate_system">Wikipedia-entry on UTM</a> | |
* @author Rolf Rander | |
*/ | |
public class UTM | |
{ |
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
git branch -m old_branch new_branch # Rename branch locally | |
git push origin :old_branch # Delete the old branch | |
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote |
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
# using: | |
# for set proxy: | |
# $ setproxy 127.0.0.1 8118 | |
# for unset: | |
# $ unsetproxy | |
function setproxy() { | |
export {http,https,ftp,HTTP,HTTPS}_proxy=http://$1:$2 | |
export no_proxy="localhost,127.0.0.1,master.cafecluster" | |
echo "Proxy variable(http,https,ftp) set to $1:$2" |
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
wordlist created from original 41G stash via: | |
grep -rohP '(?<=:).*$' | uniq > breachcompilation.txt | |
Then, compressed with: | |
7z a breachcompilation.txt.7z breachcompilation.txt | |
Size: |
We can make this file beautiful and searchable if this error is corrected: No tabs found in this TSV file in line 0.
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
7 | |
2 | |
1 | |
0 | |
4 | |
1 | |
4 | |
9 | |
5 | |
9 |
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
import win32com.client as wincl | |
import random | |
from time import sleep | |
speak = wincl.Dispatch("SAPI.SpVoice") | |
problems=[13,30,4,14,40,5,15,50,6,16,60,70,17,'seventh','sixth','fifth','fourth'] | |
while True: | |
rnd=str(random.choice(problems)) | |
speak.Speak(rnd) |
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
import webbrowser | |
mom="http://dictionary.cambridge.org/dictionary/english/" | |
fs="line.txt" | |
f=open(fs, 'r+') | |
lines = tuple(f) | |
f.close() | |
for l in lines: | |
l=l.replace('\n','').lower() | |
if len(l)>1: | |
webbrowser.open(mom+l) |
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
# import Image | |
# f = raw_input('Image:\n') | |
# im = Image.open(f) | |
# rgb_im = im.convert('RGB') | |
# r, g, b = rgb_im.getpixel((x, y)) | |
# def distance(c1, c2): | |
# (r1,g1,b1) = c1 | |
# (r2,g2,b2) = c2 |