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
// see blog post: http://www.hiddentao.com/archives/2013/07/08/generate-overridable-getters-and-setters-in-javascript/ | |
Function.prototype.generateProperty = function(name, options) { | |
// internal member variable name | |
var privateName = '__' + name; | |
options = options || {}; | |
options.get = ('undefined' === typeof options.get ? true : options.get ); | |
options.set = ('undefined' === typeof options.set ? true : options.set ); | |
// pre-initialise the internal variable? |
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
/** | |
* Workaround to make defining and retrieving angular modules easier and more intuitive. | |
*/ | |
(function(angular) { | |
var origMethod = angular.module; | |
var alreadyRegistered = {}; | |
/** |
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
# Install Jenkins | |
wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add - | |
sudo sh -c 'echo deb http://pkg.jenkins-ci.org/debian binary/ > /etc/apt/sources.list.d/jenkins.list' | |
sudo apt-get update | |
sudo apt-get install jenkins | |
ACTION: check that Jenkins is running on yourdomain.com:8080 | |
# SSL certificates with Perfect Forward Secrecy | |
# (assuming /etc/ssl/certs/yourdomain.com.pem already exists) |
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
diff --git a/wp-content/plugins/soundcloud-is-gold/soundcloud-is-gold-functions.php b/wp-content/plugins/soundcloud-is-gold/soundcloud-is-gold-functions.php | |
index e2eefe3..48f01b0 100644 | |
--- a/wp-content/plugins/soundcloud-is-gold/soundcloud-is-gold-functions.php | |
+++ b/wp-content/plugins/soundcloud-is-gold/soundcloud-is-gold-functions.php | |
@@ -610,18 +610,20 @@ function soundcloud_is_gold_player($id, $user, $autoPlay, $comments, $width, $cl | |
$player = '<div class="soundcloudIsGold '.esc_attr($classes).'" id="soundcloud-'.esc_attr($id).'">'; | |
+ $httpPrefix = (is_ssl() ? 'https' : 'http'); | |
+ |
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
"use strict"; | |
var HipChatter = require('hipchatter'), | |
Q = require('bluebird'); | |
var _ = require('waigo')._; | |
module.exports = function*(app) { | |
if (app.config.hipChat) { |
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
browserify = require 'browserify' | |
source = require 'vinyl-source-stream2' | |
uglify = require 'gulp-uglify' | |
watchify = require 'watchify' | |
gulp = require 'gulp' | |
gutil = require 'gulp-util' | |
gulp.task 'js', -> | |
_process = (b) -> |
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 | |
MONGO_DATABASE="name here" | |
APP_NAME="name of app" | |
MONGO_HOST="127.0.0.1" | |
MONGO_PORT="27017" | |
TIMESTAMP=`date +%F-%H%M` | |
MONGODUMP_PATH="/usr/bin/mongodump" | |
BACKUPS_DIR="/opt/backup/$APP_NAME" |
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
'use strict'; | |
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } }; | |
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constr |
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 use on: "My Network" page | |
This will first load full list of invite suggestions by auto-scrolling to bottom of page. | |
Once no more suggestions are left to load it will auto-connect to all by clicking all | |
Connect buttons (with 100ms interval between each click). | |
How to run: Run the below code in your browser's Javascript console (see | |
Developer Tools in chrome). DO NOT close or change the browser tab whilst this is running. |
OlderNewer