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 SO Chat room KeepAlive Plus | |
// @author Robert Lemon | |
// @version 0.0.3 | |
// @namespace | |
// @description make rooms not die | |
// @include http://chat.stackoverflow.com/rooms/* | |
// @include http://chat.stackexchange.com/rooms/* | |
// @include http://chat.meta.stackexchange.com/rooms/* | |
// ==/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
// ==UserScript== | |
// @name SO Chat room gif autobinner | |
// @author Robert Lemon | |
// @version 0.0.32 | |
// @namespace | |
// @description make rooms not suffer gifs | |
// @include http://chat.stackoverflow.com/rooms/* | |
// ==/UserScript== | |
(function(global) { | |
"use strict"; |
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 | |
/** | |
* Represents a MIME content type | |
* | |
* @author Chris Wright <github@daverandom.com> | |
*/ | |
class ContentType | |
{ | |
/** |
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
[ | |
{ | |
"match": "You fight like a Dairy Farmer!", | |
"description": "swordfighting for might pirates", | |
"listener": "hear", | |
"response": "How appropriate! You fight like a cow!" | |
}, | |
{ | |
"match": "This is the END for you, you gutter crawling cur!", | |
"description": "swordfighting for might pirates", |
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
Create a file in your lib folder, like **rootproject**/lib/routes.map.js | |
load the module in your file and initialize with the data: | |
var jsonCoordinates = { | |
'destination': dest.latitude + ',' + dest.longitude, | |
'origin': origin.latitude + ',' + origin.longitude, | |
}; | |
var routes = require("routes.map")(jsonCoordinates, mapview); |
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
vendor # ignore composer data | |
# ignore PHP Storm config | |
# you may want to ignore your IDE config and you may want to commit it, up to you | |
.idea |
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
// For iOS7 only, set the window's top to 20 so they start under the status bar. | |
Alloy.Globals.windowTop = (OS_IOS && parseInt(Ti.Platform.version[0], 10) >= 7) ? 20 : 0; |
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
'Label[platform=android]': { | |
color: '#000' // all platforms except Android default to black | |
} | |
'Window': { | |
backgroundColor: '#fff' // white background instead of default transparent | |
} | |
'Window[platform=android]': { | |
modal: false // make android windows all heavyweight |
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 | |
function buildUrl($uri, array $params) { | |
$matches = []; | |
$pattern = '{\s* ([a-zA-Z_][a-zA-Z0-9_-]*) \s*(?:: \s* ([^{}]*(?:\{(?-1)\}[^{}]*)*))?\}'; | |
$optionalSegments = '\[.*'.$pattern.'\]'; | |
$uri = preg_replace_callback('~'.$optionalSegments.'~x', function($match) use ($params) { | |
$uri = trim($match[0], '[]'); | |
if (isset($params[$match[1]])) { |
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
var btn = $('<button class="button">Bulk Trash</button>'), | |
room = document.forms[0].elements.room.value; | |
btn.on('click', function() { | |
var modal = $('<div><h4>Trash Who?</h4></div>'), | |
$users = $('#present-users:not(.more)').clone(); | |
modal.append($users).addClass('popup room-popup').css({ | |
bottom: btn.position().top, | |
left: btn.position().left | |
}).on('click', function(e) { | |
if (confirm("Would you like to trash all posts by " + e.target.title)) { |
OlderNewer