curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.1/install.sh | bash
nvm install v6.11
import React from "react"; | |
import axios from "axios"; | |
import {Cookies} from "react-cookie"; | |
export const ApplicationContext = React.createContext({ | |
axiosClient: axios.create(), | |
}); | |
export const AuthenticationContext = React.createContext({ | |
getCSRFToken: () => null |
function State() { | |
this.actions = {}; | |
this.subscriptions = []; | |
this.history = []; | |
} | |
State.prototype.subscribe = function(element, action, callback) { | |
this.subscriptions[action] = this.subscriptions[action] || []; | |
this.subscriptions[action].push(function(data) { | |
callback.apply(element, data); |
def _fetchImageSizes(self, images: list): | |
TIMEOUT_CONNECT = 2 | |
async def fetchImage(image: dict): | |
ctx = ssl.create_default_context() | |
ctx.set_ciphers('DEFAULT@SECLEVEL=0') | |
ctx.check_hostname = False | |
ctx.verify_mode = ssl.CERT_NONE | |
timeout = aiohttp.ClientTimeout(total=TIMEOUT_CONNECT) |
git rev-list --objects --all \ | |
| git cat-file --batch-check='%(objecttype) %(objectname) %(objectsize) %(rest)' \ | |
| sed -n 's/^blob //p' \ | |
| sort --numeric-sort --key=2 \ | |
| cut -c 1-12,41- \ | |
| $(command -v gnumfmt || echo numfmt) --field=2 --to=iec-i --suffix=B --padding=7 --round=nearest |
#!/bin/bash | |
#set -x | |
# Shows you the largest objects in your repo's pack file. | |
# Written for osx. | |
# | |
# @see https://stubbisms.wordpress.com/2009/07/10/git-script-to-show-largest-pack-objects-and-trim-your-waist-line/ | |
# @author Antony Stubbs | |
# set the internal field separator to line break, so that we can iterate easily over the verify-pack output |
<script language="Javascript1.1" type="text/javascript"> | |
var ftClick = getRequestParameter('target',location.href); | |
var ftExpTrack_3096092 = ""; | |
var ftX = ""; | |
var ftY = ""; | |
var ftZ = ""; | |
var ftOBA = 1; | |
var ftContent = ""; | |
var ftCustom = ""; | |
var ft1920x1080_OOBclickTrack = ""; |
# first haproxy entry | |
frontend fe-scalinglaravel | |
bind *:80 | |
acl letsencrypt-acl path_beg /.well-known/acme-challenge/ | |
use_backend letsencrypt-backend if letsencrypt-acl | |
default_backend test |
#!/bin/bash | |
COOKIE_JAR="ab-cookie-jar" | |
COOKIE_NAME="_myapp_session" | |
USERNAME="[email protected]" | |
PASSWORD="password" | |
LOGIN_PAGE_URI="http://localhost:3000/users/sign_in" | |
TEST_PAGE_URI="http://localhost:3000/dashboard" | |
echo "Logging in and storing session id." |
openssl genrsa -des3 -out smime.key 4096 | |
openssl req -new -key smime.key -out smime.csr | |
openssl x509 -req -days 3650 -in smime.csr -CA ca.crt -CAkey ca.key -set_serial 1 -out smime.crt -addtrust emailProtection -addreject clientAuth -addreject serverAuth -trustout -extfile smime.cnf -extensions smime | |
openssl pkcs12 -export -in smime.crt -inkey smime.key -out smime.p12 -chain -CAfile ca.crt |