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
FROM ubuntu:18.04 | |
COPY ./app /app | |
RUN chmod u+s /app | |
RUN useradd -s /bin/bash just-user | |
USER just-user |
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
function isChatMessage(message) { | |
if (message.__x_isSentByMe) { | |
return false; | |
} | |
if (message.__x_isNotification) { | |
return false; | |
} | |
if (!message.__x_isUserCreatedType) { | |
return false; | |
} |
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
.fake-browser { | |
color: black; | |
} | |
.fake-browser-bar { | |
padding: 10px 8px 6px; | |
border-top-left-radius: 3px; | |
border-top-right-radius: 3px; | |
border-bottom: 2px solid #ccc; |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<title>Multiple Components</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1" /> | |
<meta name="HandheldFriendly" content="True"> | |
<meta name="MobileOptimized" content="320"> | |
<link rel="stylesheet" type="text/css" href=""> |
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) { |
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
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
// 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
/* | |
* 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
var isoCountries = { | |
'AF' : 'Afghanistan', | |
'AX' : 'Aland Islands', | |
'AL' : 'Albania', | |
'DZ' : 'Algeria', | |
'AS' : 'American Samoa', | |
'AD' : 'Andorra', | |
'AO' : 'Angola', | |
'AI' : 'Anguilla', | |
'AQ' : 'Antarctica', |
NewerOlder