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 Polygon(height, width) { //class constructor | |
| this.name = 'Polygon'; | |
| this.height = height; | |
| this.width = width; | |
| } | |
| Polygon.prototype = { | |
| sayName: function () { //class method | |
| console.log('Hi, I am a ' + this.name + '.'); | |
| } |
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 [one, two] = [1, 2]; | |
| let {a:three, b:four} = {a: 3, b: 4}; | |
| console.log(one, two, three, four); // 1 2 3 4 |
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* range(start, end, step) { | |
| while (start < end) { | |
| yield start; | |
| start += step; | |
| } | |
| } | |
| for (let i of range(0, 10, 2)) { | |
| console.log(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
| // Generated on 2014-07-08 using generator-angular 0.9.3 | |
| 'use strict'; | |
| // # Globbing | |
| // for performance reasons we're only matching one level down: | |
| // 'test/spec/{,*/}*.js' | |
| // use this if you want to recursively match all subfolders: | |
| // 'test/spec/**/*.js' | |
| var modRewrite = require('connect-modrewrite'); |
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 prefetch(getKey, getValue, getInitialValue, propName) { | |
| const inFlight = new Set(); | |
| const cache = new Map(); | |
| return ChildComponent => { | |
| return class extends React.Component { | |
| state = {value: getInitialValue(this.props)}; | |
| componentWillReceiveProps(nextProps) { | |
| const key = getKey(nextProps); | |
| if (cache.has(key)) { | |
| // Use cached value |
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
| global | |
| chroot /var/lib/haproxy | |
| crt-base /etc/pki/tls/certs | |
| daemon | |
| group haproxy | |
| log 127.0.0.1 local0 | |
| maxconn 2000 | |
| pidfile /var/run/haproxy.pid | |
| stats socket /var/lib/haproxy/stats | |
| tune.ssl.default-dh-param 2048 |
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
| # Installing tmux on Amazon-EC2 | |
| # If you don't have libevent install use wget to install the libevent and install | |
| wget https://github.com/downloads/libevent/libevent/libevent-2.0.18-stable.tar.gz | |
| tar zxf libevent-2.0.18-stable.tar.gz | |
| sudo ./configure & sudo make install | |
| # If you don't have curses install use yum to install the curses |
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
| Generating random data (100.00MB) | |
| Start benchmark rc4-md5 | |
| Encrypt data in 0.224s | |
| Decrypt data in 0.222s | |
| Start benchmark aes-128-cfb | |
| Encrypt data in 0.599s | |
| Decrypt data in 0.597s | |
| Start benchmark aes-256-cfb |
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
| global | |
| log /dev/log local0 | |
| log /dev/log local1 notice | |
| chroot /var/lib/haproxy | |
| stats socket /run/haproxy/admin.sock mode 660 level admin | |
| stats timeout 30s | |
| user haproxy | |
| group haproxy | |
| daemon | |
| maxconn 2048 |
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
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| # | |
| # System: macOS 12+ | |
| # Version: TeamViewer v15.x.x | |
| # Python: 3.x.x | |
| # Command: sudo python TeamViewer-15-id-changer.py | |
| # | |
| import os |
OlderNewer