WAT?
Lyon.rb - Octobre 2012
Philippe Creux - @pcreux
- http://pcreux.com
marko@harman:~$ sudo gem install rails | |
[sudo] password for marko: | |
Successfully installed activesupport-3.0.0 | |
Successfully installed i18n-0.4.1 | |
Successfully installed activemodel-3.0.0 | |
Successfully installed rack-1.2.1 | |
Successfully installed rack-mount-0.6.13 | |
Successfully installed tzinfo-0.3.23 | |
Successfully installed erubis-2.6.6 | |
Successfully installed actionpack-3.0.0 |
<html> | |
<head></head> | |
<body> | |
<canvas id="canvas" width="800" height="600"></canvas> | |
<script> | |
var canvas = document.getElementById("canvas").getContext('2d'); | |
canvas.shadowColor="#000"; |
WAT?
Lyon.rb - Octobre 2012
Philippe Creux - @pcreux
- http://pcreux.com
# If you're having cert issues on ruby 2.0.0-p0, the issue is most likely that ruby can't | |
# find the required intermediate certificates. If you built it via rbenv/ruby-build, then | |
# the certs are already on your system, just not where ruby expects them to be. | |
# When ruby-build installs openssl, it installs the CA certs here: | |
~/.rbenv/versions/2.0.0-p0/openssl/ssl/cacert.pem | |
# Ruby is expecting them here: | |
$(ruby -ropenssl -e 'puts OpenSSL::X509::DEFAULT_CERT_FILE') | |
# Which for me, is this path: |
# stolen from http://github.com/cschneid/irclogger/blob/master/lib/partials.rb | |
# and made a lot more robust by me | |
# this implementation uses erb by default. if you want to use any other template mechanism | |
# then replace `erb` on line 13 and line 17 with `haml` or whatever | |
module Sinatra::Partials | |
def partial(template, *args) | |
template_array = template.to_s.split('/') | |
template = template_array[0..-2].join('/') + "/_#{template_array[-1]}" | |
options = args.last.is_a?(Hash) ? args.pop : {} | |
options.merge!(:layout => false) |
/* Flatten das boostrap */ | |
.well, .navbar-inner, .popover, .btn, .tooltip, input, select, textarea, pre, .progress, .modal, .add-on, .alert, .table-bordered, .nav>.active>a, .dropdown-menu, .tooltip-inner, .badge, .label, .img-polaroid { | |
-moz-box-shadow: none !important; | |
-webkit-box-shadow: none !important; | |
box-shadow: none !important; | |
-webkit-border-radius: 0px !important; | |
-moz-border-radius: 0px !important; | |
border-radius: 0px !important; | |
border-collapse: collapse !important; | |
background-image: none !important; |
'''Routines for manipulating the Dock''' | |
import os | |
import subprocess | |
from Foundation import NSURL | |
from Foundation import CFPreferencesAppSynchronize | |
from Foundation import CFPreferencesCopyAppValue | |
from Foundation import CFPreferencesSetAppValue |
#!/bin/bash | |
#requirements: | |
#sha1sum (part of coreutils) | |
#xxd (part of vim) | |
#https://github.com/socram8888/ulread | |
#https://github.com/socram8888/amiitool | |
#put ulread, ulwrite and amiitool in the same directory as this script | |
if [ $# -ne 2 ] |
<?php | |
// Licence: WTFPL ! http://www.wtfpl.net/about/ | |
$fbAuth = array("facebook_id" => "123456789", "facebook_token" => "<Use charles proxy to do man-in-middle SSL sniffing and extract fb token>"); | |
// Do the magic. | |
$tinderToken = tinderCall("auth", "token", $fbAuth); // Authenticate | |
$authToken = "X-Auth-Token: $tinderToken\r\nAuthorization: Token token=\"$tinderToken\"\r\n"; |
These two files should help you to import passwords from mac OS X keychains to 1password. | |
Assumptions: | |
1) You have some experience with scripting/are a power-user. These scripts worked for me | |
but they haven't been extensively tested and if they don't work, you're on your own! | |
Please read this whole document before starting this process. If any of it seems | |
incomprehensible/frightening/over your head please do not use these scripts. You will | |
probably do something Very Bad and I wouldn't want that. | |
2) You have ruby 1.9.2 installed on your machine. This comes as standard with Lion, previous | |
versions of OS X may have earlier versions of ruby, which *may* work, but then again, they |