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
<link rel="import" href="../components/polymer/polymer.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
:host { | |
position: absolute; | |
width: 100%; | |
height: 100%; |
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
<link rel="import" href="../paper-button/paper-button.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
:host { | |
position: absolute; | |
width: 100%; | |
height: 100%; |
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
// ==UserScript== | |
// @name Disable interceptions of Cmd+t, Cmd+w, Cmd+shift+] and Cmd+shift+[ | |
// @namespace http://userscripts.org/users/642403 | |
// @description Stop websites from hijacking keyboard shortcuts | |
// | |
// @run-at document-start | |
// @include * | |
// @grant none | |
// ==/UserScript== |
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
set mySSID to do shell script "/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I | awk '/ SSID/ {print substr($0, index($0, $2))}'" | |
if mySSID is "HomeNetwork" then | |
set message to "Working from home" | |
end if | |
if mySSID is "WorkNetwork" then | |
set message to "Working from the office" | |
end if | |
tell application "System Events" | |
if exists process "Adium" then tell application "Adium" to set status message of every account to message | |
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
#!/bin/sh | |
interface=$(route get 0.0.0.0 2>/dev/null | awk '/interface: / {print $2}') | |
domain="http://$(ipconfig getifaddr $interface):3000" | |
echo $domain |
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
-- Recive a HTTP POST and relay it | |
-- Author: Waqas Hussain | |
-- Derived from mod_post_msg by Kim Alvefur <zash@zash.se> | |
-- Some code borrowed from mod_webpresence | |
-- | |
-- Example usage: | |
-- curl http://example.com:5280/presence/user -d "Hello there" | |
-- or | |
-- curl http://example.com:5280/presence/user@example.com -d "Hello there" |
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 SessionController < ApplicationController | |
def index_attempt_one | |
if !session[:unset_key] | |
redirect_to :action => 'login' | |
end | |
# Anything here gets executed too! D-: | |
end | |
def index_attempt_two | |
if !session[:unset_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
NoMethodError in Support_calls#new | |
Showing c:/Users/james/code/support/app/views/support_calls/_form.html.erb where line #28 raised: | |
undefined method `resolved' for #<SupportCall:0x1254fcd> | |
Extracted source (around line #28): | |
25: </div> | |
26: <div class="checkbox"> |
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 SupportCallsController < ApplicationController | |
def new | |
@support_call = SupportCall.new | |
@customers = Customer.all | |
end | |
def create | |
@support_call = SupportCall.new(params[:support_call]) | |
respond_to do |format| |
OlderNewer