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
Ember.Route.extend({ | |
actions: { | |
deleteDataset: function (dataset) { | |
var self = this; | |
var cds = self.controllerFor('bigquery/modals/deleteDataset'), // controller for popup | |
bigquery = self.controllerFor('bigquery'); | |
cds.set('dataset', dataset); | |
cds.set('closeCallback', function (confirmed) { | |
if (confirmed) { | |
dataset.deleteRecord(); |
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
let dat = (y,x) => (console.log('x', x, 'y', y) && false) || (x+y); | |
console.log(dat(15,30)); | |
// let outer = (word) => ((logger = (letter) => for (i=0; i<letter.length; ++i) console.log(letter.charCodeAt(i))) && false) || (logger(word)); | |
// outer('It\'s a test'); // Fails | |
let arrays = (word) => Array.prototype.forEach.call(word, (letter, pos) => console.log(letter, word.charCodeAt(pos))) | |
// arrays('this is testing'); // Works | |
let each = (ar, fn) => Array.prototype.forEach.call(ar, fn); |
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
docular: { | |
useHtml5Mode: true, //Use angular's html5 mode? true/false. | |
docular_webapp_target: 'docs', //The place where the docs will be generated | |
showAngularDocs: true, | |
showDocularDocs: false, | |
examples: {}, //instructions for how to run the sandboxed examples | |
groups: [ | |
{ | |
groupTitle: 'App Stuff', | |
groupId: 'app', |
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 ApplicationRoute = Ember.Route.extend({ | |
beforeModel: function () { | |
var self = this, | |
user = this.controllerFor('currentUser'); | |
if (user.get('isLoggedIn')) { | |
var verifyPromise = user.verifyToken(); | |
return verifyPromise.then(function(userName) { | |
self.transitionTo('/'); |
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
export default Ember.Route.extend({ | |
needs: ['bigquery', 'currentUser'], | |
model: function (params, transition) { | |
console.log('ttk model for queries?', params, transition.targetName); | |
var store = this.get('store'), | |
projectId = this.get('controllers.bigquery.activeProjectId'); | |
var queries = store.find('query', { | |
projectId: params.project_id, |
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 Robin Time Left Printer | |
// @description Violently Butchered Robin Assistant | |
// @namespace com.github.cptasgard | |
// @include https://www.reddit.com/robin/ | |
// @include https://www.reddit.com/robin | |
// @version 1.9 | |
// @author LeoVerto, Wiiplay123, Getnamo, CptAsgard | |
// @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
{ "blocks" : [ | |
{ | |
"hash":"0000000000000000000c05dedcf772e152e94dbabfc9b9543184fd5eda328467", | |
"ver":536870912, | |
"prev_block":"0000000000000000002bd9eee2a05232870f71b2d4028f9150fa475df0fa56e0", |
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
import React from 'react' | |
import { withMultiContext } from 'with-context' | |
const contexts = (ctx => { | |
const results = [] | |
let keys = ctx.keys() | |
let values = keys.map(ctx) | |
for (const [index, dir] of Object.entries(keys)) { | |
const match = dir.match(/^\.\/([^/]+)$/) | |
if (!match) continue |
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
//how to execute: node verify.js <path file that you want to verify> <certificate path> <hash generate by sign.js> | |
//output: true if files are equal, false otherwise. | |
var crypto = require('crypto'); | |
var fs = require('fs'); | |
var args = process.argv.slice(2); | |
var fileName = args[0]; | |
var certPath = args[1]; | |
var sig = args[2]; |
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
//how to execute: node sign.js <path file> <path private key> | |
//output: signature of file | |
var crypto = require('crypto'); | |
var fs = require('fs'); | |
var args = process.argv.slice(2); | |
var fileName = args[0]; | |
var keyPath = args[1]; | |
//openssl genrsa -out key.pem 1024 |
OlderNewer