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 Tweet icon for Jeeves in SO chat | |
// @namespace http://room11.org/ | |
// @version 1.0 | |
// @description @PeeHaa sucks | |
// @author @DaveRandom | |
// @match *://chat.stackoverflow.com/rooms/* | |
// @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
<?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
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
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)) { |
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
<?php | |
// Server file | |
class PushNotifications { | |
// (Android)API access key from Google API's Console. | |
private static $API_ACCESS_KEY = 'AIzaSyDG3fYAj1uW7VB-wejaMJyJXiO5JagAsYI'; | |
// (iOS) Private key's passphrase. | |
private static $passphrase = 'joashp'; | |
// (Windows Phone 8) The name of our push channel. | |
private static $channelName = "joashp"; |
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
// ==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
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
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
NewerOlder