Skip to content

Instantly share code, notes, and snippets.

View ianiv's full-sized avatar

Ianiv Schweber ianiv

View GitHub Profile
@ianiv
ianiv / gist:3492746
Created August 27, 2012 22:04
Precompile and upload assets
load 'deploy/assets'
namespace :deploy do
namespace :assets do
desc 'Precompile assets locally and upload them to the server'
task :precompile, :roles => assets_role, :except => { :no_release => true } do
run_locally "bundle exec rake assets:precompile"
top.upload("public/assets", "#{shared_path}", via: :scp, recursive: true)
run_locally "bundle exec rake assets:clean"
end
@ianiv
ianiv / gist:4128445
Created November 21, 2012 23:10
UINavigationController custom transitions
// With transitionWithView
[UIView transitionWithView:self.navigationController.view
duration:0.5
options:UIViewAnimationOptionTransitionFlipFromBottom
animations:^{
[self.navigationController pushViewController:viewController animated:NO];
}
completion:nil];

Keybase proof

I hereby claim:

  • I am ianiv on github.
  • I am ianiv (https://keybase.io/ianiv) on keybase.
  • I have a public key whose fingerprint is E6EB 3438 D496 F87C 56F4 F9D1 9611 E4EE 9C1C AFC6

To claim this, I am signing this object:

import wiringpi2
import http.client, urllib
def dingdong():
conn = http.client.HTTPSConnection("api.pushover.net:443")
conn.request("POST", "/1/messages.json",
urllib.parse.urlencode({
"token": "token",
"user": "user",
"message": "Ding Dong!",
!/bin/bash
osascript <<EOD
tell application "Finder"
if not (disk "VolumeName" exists) then
mount volume "smb://user:password@hostname/VolumeName"
end if
end tell
EOD