Skip to content

Instantly share code, notes, and snippets.

View soheilbm's full-sized avatar
🐢
I may be slow to respond.

Soheil soheilbm

🐢
I may be slow to respond.
View GitHub Profile
@soheilbm
soheilbm / 0_reuse_code.js
Created March 13, 2014 07:03
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@soheilbm
soheilbm / heroku-node-init.sh
Last active August 29, 2015 14:26 — forked from phatblat/heroku-node-init.sh
Bash script to initialize an OS X box for local development of node app on heroku
#!/bin/bash
NODE_VERSION=0.4.7
NPM_VERSION=1.0.94
# Save script's current directory
DIR="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
#cd "${DIR}"
#
@soheilbm
soheilbm / encrypt_xor1.swift
Created February 11, 2016 17:28 — forked from alskipp/encrypt_xor1.swift
Swift encrypt/decrypt string using XOR
import Foundation
extension Character {
func utf8() -> UInt8 {
let utf8 = String(self).utf8
return utf8[utf8.startIndex]
}
}
func encrypt(c:Character, key:Character) -> String {
@soheilbm
soheilbm / gist:32d67c3aaad30cf57300d0ad4fd4775c
Last active April 20, 2024 01:52
Install libimobiledevice on OSX
Install libimobiledevice on Mac OS X
So you'd like to manage your iOS devices by command line?
You can use libimobiledevice tools for that.
Easy on Linux. Let's see how it is on Mac OS X.
You'll need to:
1. install Xcode
2. start Xcode and agree to it's license
3. install Xcode command line tools (Start Xcode, Go to Preferences -> Downloads tab)
4. install homebrew by this command (sudo password will be prompted)
//: FP Playground
import UIKit
// Expressive Functions
func greeting(_ name: String) -> String {
return "Greeting \(name)!"
}