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 scripts = ['app.a700a9a3e91a84de5dc0.js']; // script for all users | |
var newBrowser = ( | |
'fetch' in window && | |
'Promise' in window && | |
'assign' in Object && | |
'keys' in Object | |
); | |
if (!newBrowser) { |
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
# Usage: redis-cli publish message hello | |
require 'sinatra' | |
require 'redis' | |
conns = [] | |
get '/' do | |
erb :index | |
end |
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
# Usage: redis-cli publish message.achannel hello | |
require 'sinatra' | |
require 'redis' | |
conns = Hash.new {|h, k| h[k] = [] } | |
Thread.abort_on_exception = true | |
get '/' do |
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
(function() { | |
let canvas = document.querySelector('canvas'); | |
// Optional frames per second argument. | |
let stream = canvas.captureStream(25); | |
let recorder = new MediaRecorder(stream, options); | |
let blobs = []; | |
function download(blob) { | |
var url = window.URL.createObjectURL(blob); | |
var a = document.createElement('a'); |
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
require 'fileutils' | |
start_time = Time.now | |
SOURCE_DB = { | |
:name => 'db_name', | |
:user => 'db_user', | |
:password => 'db_pass', | |
:host => 'localhost' |
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
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'friendly' | |
Friendly.configure( | |
:adapter => 'mysql', | |
:host => 'localhost', | |
:user => 'root', | |
:password => '', |
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
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'friendly' | |
Friendly.configure( | |
:adapter => 'mysql', | |
:host => 'localhost', | |
:user => 'root', | |
:password => '', |
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
'/Applications/Google Chrome.app/Contents/MacOS/Google Chrome' --disable-xss-auditor --enable-devtools-experiments --disable-features=enable-automatic-password-saving |
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'; | |
module.exports = function (context) { | |
var fs = require('fs'); | |
var _ = require('lodash'); | |
var scheme = 'flowkey'; | |
var insertIntent = '\n <intent-filter>\n <action android:name="android.intent.action.VIEW"></action>\n <category android:name="android.intent.category.DEFAULT"></category>\n <category android:name="android.intent.category.BROWSABLE"></category>\n <data android:scheme="' + scheme + '"></data>\n </intent-filter>\n '; | |
var manifestPath = context.opts.projectRoot + '/platforms/android/AndroidManifest.xml'; | |
var androidManifest = fs.readFileSync(manifestPath).toString(); |
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
files = [] | |
tp = TracePoint.new(:line) do |tp| | |
if tp.path =~ /bole_api/ | |
unless files.include? tp.path | |
puts "#{tp.path}".inspect | |
files.push(tp.path) | |
end | |
end | |
end | |
tp.enable |