Skip to content

Instantly share code, notes, and snippets.

View FleXoft's full-sized avatar
😃

FLEISCHMANN György, _flex, Gyurci, FleXoft FleXoft

😃
View GitHub Profile
@FleXoft
FleXoft / webkit2png
Last active May 23, 2018 08:21
webkit2png python "App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app's Info.plist file."
webkit2png --ignore-ssl-check [options] [http://example/]
@FleXoft
FleXoft / dns-sd
Last active May 25, 2018 11:59
Reach your home iTunes library via VPN running on your MAC
#!/bin/bash
dns-sd -P "Music on server" _daap._tcp local 3689 BLACKHOLE.fleischmann.local. 192.168.1.2 "Password=false" "Version=196610" "iTSh Version=131073" "mtd-version=0.2.4.1" "Machine Name=MUZAX" "Machine ID=" "Database ID=" "txtvers=1"
@FleXoft
FleXoft / recursive rename
Last active June 11, 2018 08:20
Recursively change filename part
find . -type f -name "*copy.jpg" -exec sh -c 'mv "{}" "$( echo {} | sed 's/ copy/_ORIGINAL/' )"' \;
@FleXoft
FleXoft / imagemagick
Created June 11, 2018 12:43
Create blank image in Imagemagick
convert -size 800x800 xc:white white.png
@FleXoft
FleXoft / regexp
Created June 22, 2018 18:31
Exclude lines where the first 3 columns are all the same number
grep -v -P "^(\d+) \1 \1 "
@FleXoft
FleXoft / git
Created June 27, 2018 18:41
Remove .DS_Store files from git repo
find . -name .DS_Store -print0 | xargs -0 git rm -f --ignore-unmatch
echo .DS_Store >> .gitignore
@FleXoft
FleXoft / PhotoSwipeGenerator
Created September 9, 2018 07:14
photo generation workflow for andras.fleischmann.hu
cd ~/gith/andras.fleischmann.hu/
PhotoSwipeGenerator.pl -verb
jekyll b
cp _site/ii.html index.html
open index.html
@FleXoft
FleXoft / jekyll
Created October 2, 2018 13:52
jekyll
sudo gem update jekyll
@FleXoft
FleXoft / java
Created October 24, 2018 11:24
macOS Oracle java environment setting
export JAVA_HOME=/Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home
@FleXoft
FleXoft / shell
Created November 1, 2018 14:02
Make every 3rd line of input green to make it easier to follow the lines among others
function thirdline(){ awk '{if ( NR%3==0 ){ print "\033[32m" $0 "\033[0m"} else{ print } }'; }