Skip to content

Instantly share code, notes, and snippets.

const Sequelize = require('sequelize');
function doQuery(connection, parts, ...args) {
let sqlString = parts[0];
for (let i = 1; i < parts.length; i++) {
sqlString += ' $' + i + ' ' + parts[i];
}
return connection.query(sqlString, {
bind: args
});
  1. Go to https://github.com/gamefreak/Conversations/releases/latest
  2. In the downloads section click the entry ending in .apk
  3. Once it finishes downloading click open
  4. When prompted click install
  5. Once install completes, click open
  6. Click use my own provider
  7. Enter your JID and password.
  8. Click next
  9. When asked to publish an avatar either follow the instructions or click skip (I don't care)
  10. Doesn't matter if Conversations accesses your contacts
from yapsy.IPlugin import IPlugin
import zipfile
import json
class ConversationsBackend(IPlugin):
pack = None
def build(self, pack):
self.pack = pack
print "[Conversations] Building zip..."
var base_path = 'http://qdb.fimsquad.com/emotes/';
var xhr = new XMLHttpRequest;
xhr.open('GET', base_path + 'emotes.json');
xhr.onload = emotes_loaded;
xhr.send(null);
var emoteTable = {}
var emoteReplacements = [];
@gamefreak
gamefreak / binds.js
Created April 2, 2015 22:49
Class method binding
function bound(object, key, descriptor) {
let boundMethodId = Symbol('bound-method-'+key);
let theMethod = descriptor.value;
delete descriptor.value;
delete descriptor.writable;
descriptor.get = function() {
//Memoize it per instance so we can remove listeners
return this[boundMethodId] || (this[boundMethodId] = theMethod.bind(this));
};
!(function ($, window, pluginName, undefined){
$.fn[pluginName] = function(action, buffer) {
if (buffer == null) buffer = 40;
return this.map(function() {
console.log(pluginName, action, buffer, this);
var $this = $(this);
if (action === 'start') {
var top = $('<div class="edgescroll-trigger edgescroll-top">')[0],
bottom = $('<div class="edgescroll-trigger edgescroll-bottom">')[0];
var $triggers = $([top, bottom]).css({
expression => or_expression
or_expression => and_expression ["OR" and_expression]*
and_expression => predicate ["AND" predicate]*
predicate => "(" expression ")" | "NOT" expression | subreddit_test | score_test | day_test
subreddit_test => "subreddit IS " /^\/r\/[a-z0-9]+$/i
| "subreddit MATCHES" /^\/r\/[a-z0-9*]+$/i
/*
(*
ENBF + JavaScript RegEx
*)
start = ws, expression, ws
class Dialog
include PageObject
button(:close, class: 'close')
end
class AddPersonDialog < Dialog
text_field(:first_name, id: 'first_name')
text_field(:last_name, id: 'last_name')
#extension GL_EXT_gpu_shader4 : enable
const int A = 0x23c7;
const int B = 0xe953;
const int C = 0xc207;
const int D = 0xe853;
const int E = 0xc287;
const int F = 0x0287;
const int G = 0xe307;
const int H = 0x23c4;