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/env ruby | |
require 'gosu' # gem install gosu --no-document | |
include Gosu | |
$dimension, $splits = 200, 20 | |
$size = $dimension.to_f / $splits.to_f | |
class Worm | |
attr_writer :dir | |
def initialize() reset 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
class App | |
def self.call(env) | |
path = env["REQUEST_PATH"] | |
case path | |
when "/" | |
body = "<h1>Hello,</h1><p>world!</p>" | |
[200, {}, [body]] | |
else | |
body = "Couldn't find any page at #{path}" | |
[400, {}, [body]] |
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 "test_helper" | |
class CompaniesTest < ActionDispatch::IntegrationTest | |
it "admin can signin and visit companies" do | |
admin = new_session_as :admin | |
admin.goes_to "/companies" | |
end | |
private |
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
-- 1. Place in ~/Library/Scripts and enable the Applescript menu via the Applescript Editor | |
-- 2. Substitute "vpn.example.com" and "redacted" for your VPN server and password | |
-- 3. Open Security & Privacy System Preferences, go to Privacy, Accessibility | |
-- 4. Enable Applescript Editor and System UI Server | |
-- 5. Trigger script from the menu | |
-- 6. Enjoy being connected | |
tell application "Cisco AnyConnect Secure Mobility Client" | |
activate | |
end tell |
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
<?php | |
/** | |
* @author Alexander Ross <alex@aross.se> | |
* @license MIT | |
*/ | |
class AssetsHelper | |
{ | |
private $js_array = []; | |
private $css_array = []; |
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
Show hidden characters
{ | |
"auto_find_in_selection": true, | |
"bold_folder_labels": true, | |
"draw_white_space": "all", | |
"ensure_newline_at_eof_on_save": true, | |
"fade_fold_buttons": false, | |
"fold_buttons": true, | |
"folder_exclude_patterns": | |
[ | |
".svn", |
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 charset="utf-8"> | |
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet"> | |
<link href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css" rel="stylesheet"> | |
<link href='http://fonts.googleapis.com/css?family=Source+Code+Pro:400,500,600,700,900' rel='stylesheet' type='text/css'> | |
<style> | |
.icon-file-alt { |
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
angular.module('LoadingIndicator', []) | |
.config(['$httpProvider', function ($httpProvider) { | |
var startLoadingIndicator = function() { | |
angular.element('.loading').text('Loading ...'); | |
}; | |
$httpProvider.responseInterceptors.push('HttpLoadingInterceptor'); | |
$httpProvider.defaults.transformRequest.push(function (data, headersGetter) { | |
// On request start |
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
/** | |
* Karma configuration | |
* | |
* Enables tests to be written in both javascript and coffeescript. | |
* | |
* Run your tests with: `karma start spec/karma/config/unit.js` | |
* | |
* Place your tests in similar paths: `spec/javascripts/<anydir>/<file>_spec.coffee` | |
* This file should be in: `spec/karma/config/unit.js` | |
* |
OlderNewer