This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Spinner | |
// -------------------------------------------------- | |
@import "variables"; | |
@import "mixins"; | |
.transform-mix (@deg, @delay) { | |
-webkit-transform: rotate(@deg) translate(0, -142%); | |
-webkit-animation-delay: @delay; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source 'https://rubygems.org' | |
gem 'capybara' | |
gem 'poltergeist' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> | |
<title>text to music</title> | |
<script type="text/javascript" charset="utf-8" src="./zepto.min.js"></script> | |
</head> | |
<body> | |
<textarea name="" id= rows="40" cols="80"></textarea> | |
<button type="submit">Muse</button> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'benchmark' | |
def do_stuff | |
`sleep 0.1` | |
end | |
Benchmark.bm(10) do |x| | |
x.report("sequential") do | |
10.times { do_stuff } | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Unboxed test</title> | |
<meta charset="utf-8" /> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/lodash.js/2.4.1/lodash.js"></script> | |
<style type="text/css" media="screen"> | |
body { | |
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sinon = require('sinon'); | |
sinon.spy(window, 'WebSocket') | |
// throws an error (see console) | |
new window.WebSocket("ws://example.com") | |
var a = { | |
b: function() {} | |
} | |
// works |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# command line usage | |
local$ ssh -gR 8022:localhost:22 remote | |
remote$ scp -P 8022 file.tgz localhost: | |
# local ~/.ssh/config | |
Host remote | |
HostName remote.example.com | |
RemoteForward 8022 localhost:22 | |
# remote ~/.ssh/config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
desc "Tell app to use local gems and tweak bundler to not break with gems coming from git" | |
task :enable_local_gems_and_bundler do | |
run %(perl -pi -e 'print "ENV[\\"GEM_HOME\\"] = \\"/home/#{user}/.gems\\"\\nGem.clear_paths\\n" if $. == 1' #{release_path}/config/application.rb) | |
run "echo 'BUNDLE_PATH: /home/#{user}/.gems/bundler' >> #{release_path}/.bundle/config" | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use File::Find; | |
File::Find::find( | |
sub { | |
return unless -f; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def _vnc_setup | |
d = '22' # vnc desktop number | |
ENV['DISPLAY'] = "localhost:#{d}" | |
hostname = `hostname`.chomp | |
vnc_pid_file = File.join(ENV['HOME'], ".vnc", "#{hostname}:#{d}.pid") | |
if File.exist?(vnc_pid_file) | |
pid = File.open(vnc_pid_file).read.chomp | |
log "Xvnc appears to be already running with pid #{pid}" | |
if `/bin/ps -p #{pid}`.split.last =~ /Xvnc/ | |
return |
OlderNewer