myfunction(item) for item in items
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
// Generated on 2014-12-15 using | |
// generator-webapp 0.5.1 | |
'use strict'; | |
// # Globbing | |
// for performance reasons we're only matching one level down: | |
// 'test/spec/{,*/}*.js' | |
// If you want to recursively match all subfolders, use: | |
// 'test/spec/**/*.js' |
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
if Rails.env.development? | |
class XipIoMiddleware | |
def initialize(app) | |
@app = app | |
end | |
def call(env) | |
%w{HTTP_HOST SERVER_NAME SERVER_ADDR HTTP_X_FORWARDED_HOST}.each do |key| | |
env[key] = env[key].sub(/myapp\.\d+\.\d+\.\d+\.\d+\.xip\.io/, "myapp.dev") if env[key].present? | |
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
<project> | |
<properties> | |
<jetty.port>8123</jetty.port> | |
</properties> | |
<build> | |
<plugins> | |
<plugin> |
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
#!/bin/sh | |
# tunnel.sh | |
# Configure | |
LOCAL_HOST=127.0.0.1; | |
USERNAME="your_username"; | |
# set your remote address and SSH port. | |
TUNNEL_PORT="2022" | |
REMOTE_HOST="my.homedomainorip.com -p $TUNNEL_PORT"; |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>NSWorkspace</key> | |
<key>SystemConfiguration</key> | |
<dict> | |
<key>State:/Network/Global/IPv4</key> | |
<dict> | |
<key>command</key> |
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
on alfred_script(q) | |
set output_devices to {"Display Audio", "Generic USB Audio Device "} | |
set input_devices to {"Display Audio", "Generic USB Audio Device "} | |
set device_keywords to {"speakers", "headphones"} | |
tell application "System Preferences" | |
reveal anchor "output" of pane id "com.apple.preference.sound" | |
tell application "System Events" | |
tell process "System Preferences" |
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
/** | |
* | |
* Også kan jeg kommentere her. | |
* | |
* Simple server-side request filter that implements CSRF protection as per the | |
* <a href="http://www.nsa.gov/ia/_files/support/guidelines_implementation_rest.pdf">Guidelines for Implementation of REST</a> | |
* by NSA (section IV.F) and | |
* section 4.3 of <a href="http://seclab.stanford.edu/websec/csrf/csrf.pdf">this paper</a>. | |
* If you add it to the request filters of your application, it will check for X-Requested-By header in each | |
* request except for those that don't change state (GET, OPTIONS, HEAD). If the header is not found, |
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
#!/bin/bash | |
# | |
# autosshd This script starts and stops the autossh daemon | |
# | |
# chkconfig: 2345 95 15 | |
# processname: autosshd | |
# description: autosshd is the autossh daemon. | |
# Source function library. | |
. /etc/rc.d/init.d/functions |
OlderNewer