Skip to content

Instantly share code, notes, and snippets.

View hasantayyar's full-sized avatar
⌨️
AFK

Hasan Tayyar Beşik hasantayyar

⌨️
AFK
View GitHub Profile
@hasantayyar
hasantayyar / README.md
Created August 17, 2012 08:53 — forked from scttnlsn/README.md
Pub/sub with MongoDB and Node.js

Pub/sub with MongoDB and Node.js

Setup:

$ mongo
> use pubsub
> db.createCollection('messages', { capped: true, size: 100000 })
> db.messages.insert({})
@hasantayyar
hasantayyar / install-theano.sh
Last active September 5, 2019 15:25
install theano
$ sudo apt-get update && sudo apt-get install -y \
build-essential \
git \
libopenblas-dev python-dev python-pip \
python-nose python-numpy python-scipy
# or `sudo pip install ...`
$ pip install --upgrade --no-deps git+git://github.com/Theano/Theano.git
@hasantayyar
hasantayyar / search-and-deploy.sh
Created March 10, 2019 20:03
Deploy missing deployment to clusters
PROJECT="your-project-name"
SEARCH=$1
FILE=$2
CLUSTER_FILTER=$3
if [ -z $SEARCH ]; then
echo "Missing param. 1st param is the search phrase"
exit 1
fi
@hasantayyar
hasantayyar / phew.png
Last active January 22, 2019 14:08
special char
phew.png
# list code lines
find . -type f -name "*.ts" -exec cat {} + | sort -u
# count them
find . -type f -name "*.ts" -exec cat {} + | sort -u | wc -l
@hasantayyar
hasantayyar / proxy.coffee
Created November 19, 2018 10:12 — forked from kn0ll/proxy.coffee
a simple nodejs request proxy as connect middleware. developed as a cross domain ajax proxy.
###
a small connect middleware proxy for cross domain ajax
@path first match group will be forwarded
@host the host you want to proxy
connect_server.use proxy '^(/.+)', 'api.twitter.com'
connect_server.use proxy '^/gh(/.+)', 'api.github.com'
###
<!-- country codes (ISO 3166) and Dial codes. -->
<select name="countryCode" id="">
<option data-countryCode="GB" value="44" Selected>UK (+44)</option>
<option data-countryCode="US" value="1">USA (+1)</option>
<optgroup label="Other countries">
<option data-countryCode="DZ" value="213">Algeria (+213)</option>
<option data-countryCode="AD" value="376">Andorra (+376)</option>
<option data-countryCode="AO" value="244">Angola (+244)</option>
<option data-countryCode="AI" value="1264">Anguilla (+1264)</option>
<option data-countryCode="AG" value="1268">Antigua &amp; Barbuda (+1268)</option>
@hasantayyar
hasantayyar / gitlab-logo.png
Last active September 14, 2018 14:18
gitlab
gitlab-logo.png
@hasantayyar
hasantayyar / install-multithread-caffe.sh
Last active September 14, 2018 07:25
caffe on new ubuntu with multithread (cpu)
# This script installs Caffe and pycaffe on Ubuntu 14.04 x64 or 14.10 x64. CPU only, multi-threaded Caffe.
# Usage:
# 0. Set up here how many cores you want to use during the installation:
# By default Caffe will use all these cores.
# an alternative way:
# One way is to use OpenBLAS instead of the default ATLAS. To do so,
# sudo apt-get install -y libopenblas-dev
# Before compiling Caffe, edit Makefile.config, replace BLAS := atlas by BLAS := open
# After compiling Caffe, running export OPENBLAS_NUM_THREADS=4 will cause Caffe to use 4 cores.