This file contains hidden or 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
| sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -configure -clientopts -setvnclegacy -vnclegacy yes -setvncpw -vncpw "YOUR_PASSWORD_HERE" |
This file contains hidden or 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
| $column_width: 60px; | |
| $gutter_width: 20px; | |
| $columns: 12; | |
| .container { | |
| margin-bottom: 2em; | |
| width: ($column_width * $columns) + ($columns - 1 * $gutter_width); | |
| } | |
| .clearfix, .container { display: block; } | |
| .clearfix:after, |
This file contains hidden or 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
| task :server do | |
| require 'webrick' | |
| include WEBrick | |
| def start_webrick(config = {}) | |
| config.update(:Port => 3000) | |
| server = HTTPServer.new(config) | |
| yield server if block_given? | |
| ['INT', 'TERM'].each do |signal| |
This file contains hidden or 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 'webrick' | |
| DEPLOY_TO = '' | |
| desc "Starts an HTTP server in the current directory" | |
| task :server do | |
| config = {:Port => 3000, :DocumentRoot => '.'} | |
| server = WEBrick::HTTPServer.new config | |
| ['INT', 'TERM'].each do |signal| | |
| trap(signal) { server.shutdown } |
This file contains hidden or 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
| #! /bin/sh | |
| ### BEGIN INIT INFO | |
| # Provides: nginx | |
| # Required-Start: $all | |
| # Required-Stop: $all | |
| # Default-Start: 2 3 4 5 | |
| # Default-Stop: 0 1 6 | |
| # Short-Description: starts the nginx web server | |
| # Description: starts nginx using start-stop-daemon |
This file contains hidden or 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/env python | |
| import sys | |
| import random | |
| from ctypes import * | |
| from Phidgets.Devices.InterfaceKit import InterfaceKit | |
| from Phidgets.PhidgetException import PhidgetErrorCodes, PhidgetException | |
| try: | |
| kit = InterfaceKit() | |
| kit.openPhidget() |
This file contains hidden or 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
| class Config | |
| def initialize | |
| @config = {} | |
| end | |
| def load_file(file_name) | |
| instance_eval(File.read(file_name)) | |
| self | |
| end | |
This file contains hidden or 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
| namespace :bundler do | |
| task :create_symlink, :roles => :app do | |
| shared_dir = File.join(shared_path, 'bundle') | |
| release_dir = File.join(current_release, 'vendor/bundle') | |
| run("mkdir -p #{shared_dir} && ln -s #{shared_dir} #{release_dir}") | |
| end | |
| task :bundle_new_release, :roles => :app do | |
| bundler.create_symlink | |
| run "cd #{release_path} && bundle install --production" |
This file contains hidden or 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
| class CreateUsers < ActiveRecord::Migration | |
| def self.up | |
| create_table :users do |t| | |
| t.string :login, :null => false | |
| t.string :email, :null => false | |
| t.string :crypted_password, :null => false | |
| t.string :password_salt, :null => false | |
| t.string :persistence_token, :null => false | |
| t.string :single_access_token, :null => false | |
| t.string :perishable_token, :null => false |
This file contains hidden or 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
| $(document).keydown(function(e){ | |
| if (e.keyCode == 37) { | |
| var previous = self.currentX; | |
| self.currentX = self.limitXBounds(self.previousPageX(self.currentX)); | |
| if (self.currentX !== previous) { | |
| self.update(); | |
| } | |
| return false; | |
| }else if (e.keyCode == 39) { | |
| var previous = self.currentX; |