This file contains hidden or 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
// Copyright (c) 2015, Brad Conte (http://bradconte.com) | |
// All rights reserved. | |
// | |
// Redistribution and use in source and binary forms, with or without | |
// modification, are permitted provided that the following conditions are met: | |
// * Redistributions of source code must retain the above copyright | |
// notice, this list of conditions and the following disclaimer. | |
// * Redistributions in binary form must reproduce the above copyright | |
// notice, this list of conditions and the following disclaimer in the | |
// documentation and/or other materials provided with the distribution. |
This file contains hidden or 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
{ | |
"name": "", | |
"description": "", | |
"version": "0.0.0", | |
"private": true, | |
"author": "Brian Frichette", | |
"homepage": "", | |
"contributors": [ "Brian Frichette <[email protected]> (https://github.com/brian-frichette)" ], | |
"bugs": { "url": "" }, | |
"scripts": { "start": "nodemon app.js" }, |
This file contains hidden or 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
try{new CustomEvent('?')}catch(o_O){ | |
/*!(C) Andrea Giammarchi -- WTFPL License*/ | |
this.CustomEvent = function( | |
eventName, | |
defaultInitDict | |
){ | |
// the infamous substitute | |
function CustomEvent(type, eventInitDict) { | |
var event = document.createEvent(eventName); |
This file contains hidden or 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
if (!document.querySelectorAll) { | |
document.querySelectorAll = function (selectors) { | |
var style = document.createElement('style'), elements = [], element; | |
document.documentElement.firstChild.appendChild(style); | |
document._qsa = []; | |
style.styleSheet.cssText = selectors + '{x-qsa:expression(document._qsa && document._qsa.push(this))}'; | |
window.scrollBy(0, 0); | |
style.parentNode.removeChild(style); |
This file contains hidden or 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 isoCountries = { | |
'AF' : 'Afghanistan', | |
'AX' : 'Aland Islands', | |
'AL' : 'Albania', | |
'DZ' : 'Algeria', | |
'AS' : 'American Samoa', | |
'AD' : 'Andorra', | |
'AO' : 'Angola', | |
'AI' : 'Anguilla', | |
'AQ' : 'Antarctica', |
This file contains hidden or 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
/* | |
* Arduino Class for ArrayList | |
* Written: Obed Isai Rios | |
*/ | |
#include "Arduino.h" | |
#include "ArrayList.h" | |
ArrayList::ArrayList(char* init){ |
This file contains hidden or 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
// Part of https://github.com/chris-rock/node-crypto-examples | |
// Nodejs encryption with CTR | |
var crypto = require('crypto'), | |
algorithm = 'aes-256-ctr', | |
password = 'd6F3Efeq'; | |
function encrypt(text){ | |
var cipher = crypto.createCipher(algorithm,password) | |
var crypted = cipher.update(text,'utf8','hex') |
This file contains hidden or 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
Afghanistan | |
Albania | |
Algeria | |
Andorra | |
Angola | |
Antigua & Deps | |
Argentina | |
Armenia | |
Australia | |
Austria |
This file contains hidden or 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
// these docs, in 2.6, get bucketed into the 256 bucket (size without header = 240) | |
// From Object.bsonsize(db.data.findOne()), the size is actually 198 for reference, so add 16 to that for an exact fit | |
// with that doc size, 80,000 is a nice round number under the 16MiB limit, so will use that for the inner loop | |
// We are shooting for ~16 GiB of data, without indexes, so do 1,024 iterations (512 from each client) | |
// This will mean being a little short (~500MiB) in terms of target data size, but keeps things simple | |
for(var j = 0; j < 512; j++){ // | |
bigDoc = []; | |
for(var i = 0; i < 80000; i++){ |
This file contains hidden or 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
<script> | |
// A minimal polyfill for copying text to clipboard that works most of the time in most capable browsers. | |
// Note that: | |
// - You may not need this. `navigator.clipboard.writeText()` works directly in all modern browsers as of 2020. | |
// - In Edge, this may call `resolve()` even if copying failed. | |
// - In Safari, this may fail if there is nothing selected on the page. | |
// See https://github.com/lgarron/clipboard-polyfill for a more robust solution. | |
// | |
// License for this Gist: public domain / Unlicense | |
function writeText(str) { |
OlderNewer