This article is now published on my website: A one-off git repo server.
This file contains 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
# | |
# blob : Object from MongoDB | |
# | |
# blob.body: Buffer | |
# blob.size: length of buffer, substitute for blob.body.length | |
# blob.type: MIME (Eg. audio/x-wav) | |
# | |
# req : Object from http | |
# res : Object from http | |
# _ : Object from underscore |
- Download .rpm package here
- oracle-instantclinet*-basic-*.rpm
- oracle-instantclinet*-devel-*.rpm
- oracle-instantclinet*-sqlplus-*.rpm
- Install alien (
sudo apt-get install alien
) - Convert the rpm files and install
sudo alien -i oracle-instantclinet*-basic-*.rpm
sudo alien -i oracle-instantclinet*-devel-*.rpm
This file contains 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 bash | |
export LD_LIBRARY_PATH=/opt/oracle/instantclient | |
export ORACLE_HOME=/opt/oracle/instantclient | |
echo "Instantclient path: instantclient,/opt/oracle/instantclient" | |
sudo pecl install oci8 | |
sudo echo "extension=oci8.so" >> /etc/php5/fpm/php.ini |
$/
artifacts/
build/
docs/
lib/
packages/
samples/
src/
tests/
A running example of the code from:
- http://marcio.io/2015/07/handling-1-million-requests-per-minute-with-golang
- http://nesv.github.io/golang/2014/02/25/worker-queues-in-go.html
This gist creates a working example from blog post, and a alternate example using simple worker pool.
TLDR: if you want simple and controlled concurrency use a worker pool.
This file contains 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
# if you havent done it yet, please download the tor-browser and start it | |
# https://www.torproject.org/download/download-easy.html.en | |
wget https://www.torproject.org/dist/torbrowser/5.0/tor-browser-linux64-5.0_en-US.tar.xz | |
tar xf tor-browser-linux64-5.0_en-US.tar.xz | |
# download the source of proxychains-ng | |
git clone https://github.com/rofl0r/proxychains-ng.git | |
cd proxychains-ng |
This file contains 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
angular.module('app', ['rx']) | |
.directive('autocomplete', function () { | |
return { | |
scope: {}, | |
template: '<input ng-model="val" ng-change="update(val)" />' + | |
'<ul class="suggestions">' + | |
'<li ng-repeat="suggestion in suggestions">' + | |
'<a href="https://github.com/{{ suggestion }}"' + | |
' target="_blank">{{ suggestion }}</a>' + | |
'</li>' + |
This file contains 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
SetEnvIf Request_URI "^(.*)" PORT=65300 | |
RewriteEngine On | |
RewriteBase / | |
# CORS | |
Header add Access-Control-Allow-Origin "*" | |
# HTTPS | |
RewriteCond %{HTTPS} !=on |
OlderNewer