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
| echo kern.maxfiles=65536 | sudo tee -a /etc/sysctl.conf | |
| echo kern.maxfilesperproc=65536 | sudo tee -a /etc/sysctl.conf | |
| sudo sysctl -w kern.maxfiles=65536 | |
| sudo sysctl -w kern.maxfilesperproc=65536 | |
| ulimit -n 65536 65536 | |
| echo "ulimit -n 65536 65536" >> .bashrc | |
| source .bashrc |
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
| // https://github.com/dimorphic/bitch.pizza/blob/master/src/js/get-giphy.js | |
| // Get your key @ https://developers.giphy.com/ | |
| const GIPHY_API_KEY = '<KEY-HERE>'; // random key. Get your own! | |
| // Giphy API defaults | |
| const API = { | |
| baseURL: 'https://api.giphy.com/v1/', | |
| resource: 'gifs', | |
| key: GIPHY_API_KEY, |
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
| let parser = document.createElement('a'); | |
| parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
| parser.protocol; // => "http:" | |
| parser.hostname; // => "example.com" | |
| parser.port; // => "3000" | |
| parser.pathname; // => "/pathname/" | |
| parser.search; // => "?search=test" | |
| parser.hash; // => "#hash" | |
| parser.host; // => "example.com:3000" |
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
Show hidden characters
| { | |
| "compilerOptions": { | |
| "allowSyntheticDefaultImports": true, | |
| "declaration": false, | |
| "emitDecoratorMetadata": true, | |
| "experimentalDecorators": true, | |
| "lib": [ | |
| "dom", | |
| "es2015", | |
| "es2016" |
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
| #!/bin/bash | |
| function eco { | |
| echo "=====================================" | |
| echo $1 | |
| echo "=====================================" | |
| } | |
| # Settings | |
| export USER_DIR=/home/ec2-user | |
| export NODE_VERSION=v8.4.0 # Node.js version to install |
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"> | |
| <title>AWS IoT Pub/Sub Demo</title> | |
| </head> | |
| <body> | |
| <h1>AWS IoT Pub/Sub Demo</h1> | |
| <form> | |
| <button type="button" id="connect">connect!</button> |
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
| import {Subscriber} from "rxjs"; | |
| export function Once(milliseconds: number = 0) { | |
| return function (target, key, descriptor) { | |
| var originalMethod = descriptor.value; | |
| descriptor.value = function (...args) { | |
| var sub = originalMethod.apply(this, args); | |
| setTimeout(() => { | |
| if (sub instanceof Subscriber) { | |
| sub.unsubscribe(); |
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
| // ref: http://blog.wolksoftware.com/decorators-reflection-javascript-typescript | |
| // ref: https://medium.com/@NetanelBasal/javascript-make-your-code-cleaner-with-decorators-d34fc72af947#.fe9f2rfb8 | |
| export function timeout( milliseconds: number = 0 ) { | |
| return function( target, key, descriptor ) { | |
| var originalMethod = descriptor.value; | |
| descriptor.value = function (...args) { |
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
| // Getting a file through XMLHttpRequest as an arraybuffer and creating a Blob | |
| var rhinoStorage = localStorage.getItem("rhino"), | |
| rhino = document.getElementById("rhino"); | |
| if (rhinoStorage) { | |
| // Reuse existing Data URL from localStorage | |
| rhino.setAttribute("src", rhinoStorage); | |
| } | |
| else { | |
| // Create XHR and FileReader objects | |
| var xhr = new XMLHttpRequest(), |
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
| Am revenit cu setarile din bios pentru i7-6700k la 4,5 ghz si ram Corsair DDR4 la 3200 Mhz; | |
| Inainte totusi un mic disclaimer: aceste setari de mai jos merg la mine, nu inseamna neaparat ca vor merge pe toate sistemele cu i7 6700k; depinde din ce lot de fabricatie ati nimerit procesorul, de tipul de ram si bineinteles de versiunea de bios; | |
| Iata setarile pentru bios versiunea 1801 pe aceasta placa de baza asa cum le-am gasit eu stabile dupa 5-6 saptamani de testari: | |
| AI OVERCLOCK TUNER - Manual | |
| BCLK Frequency - 100.00 | |
| ASUS MULTICORE ENHANCEMENT - Disabled | |
| CPU CORE RATIO - SYNC ALL Cores | |
| 1-Core Ratio Limit - 45 (adica frecventa 4,5 ghz) |