Skip to content

Instantly share code, notes, and snippets.

View oboje's full-sized avatar
🎯
Focusing

Igor Popov oboje

🎯
Focusing
  • New York
View GitHub Profile
Dependency Injection
+ Testability
+ Easy customization
+ Scalability
+ Dependencies are explicit and easy manageable
Testing
+ Significant confidence on refactoring
// making a tunnel
ssh -L 5901:127.0.0.1:5901 -N -f -l home 192.168.1.10

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@oboje
oboje / iPhone_ringtone.sh
Created March 17, 2016 11:25
Create iPhone ringtone from mp3 using ffmpeg
brew reinstall ffmpeg --with-faac # Needs ffmpeg with faac encoder
ffmpeg -i <input.mp3> -ac 1 -ab 128000 -f mp4 -acodec libfaac -y -ss <beggining_second> -t <length_in_seconds> ringtone.m4r # Length can't be higher than 40 seconds
@oboje
oboje / gist:c1b942c953a50b1e13a2
Created March 15, 2016 20:53
bootable usb with iso, mac os, terminal
diskutil list
diskutil unmountDisk /dev/diskN
sudo dd if=/path/to/downloaded.iso of=/dev/diskN bs=1m
diskutil eject /dev/diskN
Assumptions:
.ipa filename is app.ipa
app is called MyApp
new provisioning profile resides at: ~/Downloads/AdHoc.mobileprovision
distribution certificate name is Company Certificate
may not need resource-rules parameter
provisioning profile is either for Adhoc, or Enterprise distribution
Commands:
@oboje
oboje / file.bash
Last active March 2, 2019 22:42
Useful macOS Terminal Commands
#remote pc on/off
username=igor
ipaddr=192.168.0.40
macaddr=10:FE:ED:37:1F:67
alias pc_off='net rpc shutdown -I $ipaddr -U $username'
alias pc_on='wakeonlan $macaddr'
#spoof mac addr
sudo ifconfig en0 ether d4:33:a3:ed:f2:16