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
@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
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 / 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
@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

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
// making a tunnel
ssh -L 5901:127.0.0.1:5901 -N -f -l home 192.168.1.10
Dependency Injection
+ Testability
+ Easy customization
+ Scalability
+ Dependencies are explicit and easy manageable
Testing
+ Significant confidence on refactoring
"Effective Engineer"
#Marcus Zarra
"Core Data for the Pragmatic Programmers"
"Core Animation"
"Cocoa Is My Girlfriend"
#Articles :
@oboje
oboje / Xcode Theme : Obsidian Code
Last active December 23, 2021 14:15 — forked from jessedc/ObsidianCode.dvtcolortheme
Xcode Theme : Obsidian Code
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>DVTConsoleDebuggerInputTextColor</key>
<string>0 0 0 1</string>
<key>DVTConsoleDebuggerInputTextFont</key>
<string>Menlo-Bold - 11.0</string>
<key>DVTConsoleDebuggerOutputTextColor</key>
<string>0 0 0 1</string>
#read array in lldb
memory read -t int -c `size` v