Skip to content

Instantly share code, notes, and snippets.

View aphex3k's full-sized avatar
🇺🇦
Слава Україні!

Michael Henke aphex3k

🇺🇦
Слава Україні!
  • Dexcom
  • San Diego, CA
  • 21:02 (UTC -08:00)
View GitHub Profile
@aphex3k
aphex3k / ffmpeg crop scale blur
Created May 8, 2016 05:21
ffmpeg crop scape and blur full HD @ 60fps
ffmpeg -i IMG_2265.TRIM.m4v -r 60 -an -aspect "16:9" -map 0:1 -vf "crop=1080:607:0:1000,scale=w=1920:h=1080,boxblur=lr=13" crop.m4v
augeas
autoconf
automake
carthage
cask-repair
clamav
cmake
dialog
eigen
fdk-aac
@aphex3k
aphex3k / ramdisk.sh
Last active April 15, 2016 20:58
Create a ramdisk for my main user and store temporary data in there
#!/bin/bash
username=michaelhenke
trap 'echo "error at line $LINENO" >> /Users/${username}/loginerror.txt' ERR
function shutdown()
{
hdiutil detach /private/tmp -force
hdiutil detach /var/run -force
hdiutil detach /Users/${username}/Library/Caches -force
hdiutil detach /Users/${username}/Library/Developer/Xcode/DerivedData -force
exit 0
@aphex3k
aphex3k / .vimrc
Last active April 13, 2016 16:10
syntax on
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
@aphex3k
aphex3k / casklist-gist
Created April 4, 2016 21:33
Backup current installed cask list to gist
#!/bin/sh
gistId=8fe981c9d3696fe97955ebea7cc3e0f2
gistOld=/tmp/gist-restore.old
gistCurrent=/tmp/gist-restore.current
if [ -f "${gistOld}" ]
then
rm "${gistOld}"
fi
@aphex3k
aphex3k / gist-restore.current
Last active April 4, 2016 21:32
Backup installed cask list to restore brew packages...
atom
bonjour-browser
charles
chromium
cocoapods
google-drive
growlnotify
hazel
joinme
macdown
@aphex3k
aphex3k / raspbian-headless-motd
Last active March 11, 2016 17:36 — forked from piksel/raspi-motd.sh
Script for setting a nice raspberry pi logo as MOTD on debian.
#!/bin/bash
logo="$(tput setaf 2)
.~~. .~~.
'. \ ' ' / .' $(tput sgr0) ------------------------------- $(tput setaf 1)
.~ .~~~..~. $(tput sgr0) _ _ $(tput setaf 1)
: .~.'~'.~. : $(tput sgr0) ___ ___ ___ ___| |_|_|___ ___ $(tput setaf 1)
~ ( ) ( ) ~ $(tput sgr0) | _| .'|_ -| . | . | | .'| | $(tput setaf 1)
( : '~'.~.'~' : ) $(tput sgr0) |_| |__,|___| _|___|_|__,|_|_| $(tput setaf 1)
~ .~ ( ) ~. ~ $(tput sgr0) |_| $(tput setaf 1)
( : '~' : )
@aphex3k
aphex3k / .bashrc
Created December 2, 2015 17:48
My favorite colored shell prompt
PS1='\[\e[0;32m\]\h\[\e[m\]:\[\e[1;34m\]\w\[\e[m\] \u\[\e[1;32m\]\$\[\e[m\] '
@aphex3k
aphex3k / avahi-http.service
Created December 2, 2015 17:28
avahi deamon advertising HTTP service on default port 80
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">%h HTTP</name>
<service>
<type>_http._tcp</type>
<port>80</port>
</service>
</service-group>
@aphex3k
aphex3k / avahi-samba.service
Created December 2, 2015 17:27
avahi deamon advertising Samba service on default port 139
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">%h</name>
<service>
<type>_smb._tcp</type>
<port>139</port>
</service>
</service-group>