Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
/** | |
* 1 req per 30 ms. | |
*/ | |
const express = require('express') | |
const app = express() | |
const resArray = new Array(); | |
function rec(){ | |
const firstInQueue = resArray.shift(); | |
if (firstInQueue) |
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
alias gl="echo '';git --no-pager log -2 --pretty=format:'%C(black)%ar %C(reset)%an %C(black)%h %n%C(yellow)%s%n' -3" | |
g() { git add --all; git commit -m "$*" } | |
gc() { git checkout "$*" } | |
gs() { git status; } | |
gll() { git pull; } |
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
class User{ | |
public String name; | |
private Boolean havePermissions; | |
}; | |
public static void main(String[] args) { | |
String input = "{name:hacker, havePermissions:true}"; | |
Gson gson = new Gson(); | |
User user = gson.fromJson(JsonSanitizer.sanitize(input), User.class); |
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
ssh -fN -L \*:27017:localhost:27017 remote | |
Forward from port 80 to 8081 (every request to port 80 will be transfered to 8081) | |
sudo ssh -L 80:localhost:8081 adsurbum@localhost |
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/perl -s | |
# | |
# solo v1.5 | |
# Prevents multiple cron instances from running simultaneously. | |
# | |
# Copyright 2007-2010 Timothy Kay | |
# http://timkay.com/solo/ | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by |
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
pod --verbose install --no-repo-update |
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
sudo su | |
cp .ssh/authorized_key ~/.ssh/ |
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
export p12 from keychain access | |
openssl pkcs12 -clcerts -nokeys -out production-cert.pem -in production.p12 | |
openssl pkcs12 -nocerts -out production-key.pem -in production.p12 | |
openssl rsa -in production-key.pem -out production-key.pem |
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
ncdu |
NewerOlder