Skip to content

Instantly share code, notes, and snippets.

Hasan Tayyar BEŞİK hasantayyar

Block or report user

Report or block hasantayyar

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@hasantayyar
hasantayyar / search-and-deploy.sh
Created Mar 10, 2019
Deploy missing deployment to clusters
View search-and-deploy.sh
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 / .htaccess
Last active Mar 2, 2019
Maintenance page redirection with htaccess
View .htaccess
# check if there is a file named maintenance.html
# so when you want to disable maintenance mode just remname "mv maintenance.html maintenance.html.disabled"
RewriteCond %{DOCUMENT_ROOT}/maintenance.html -f
RewriteCond %{SCRIPT_FILENAME} !maintenance.html
RewriteRule ^.*$ /maintenance.html [R=503,L]
ErrorDocument 503 /maintenance.html
View commands.sh
# 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 Nov 19, 2018 — forked from kn0ll/proxy.coffee
a simple nodejs request proxy as connect middleware. developed as a cross domain ajax proxy.
View proxy.coffee
###
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'
###
View html_for_international_calling coes.htm
<!-- 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 / graph.js
Last active Sep 14, 2018
extracte the state machien svg graph library from aws bundle
View graph.js
/*global dagreD3*/
/*global d3*/
/*global WheelEvent*/
/*global window */
(function () {
"use strict";
var module = angular.module("WorkflowGraph", []);
function intersectRect(node, point) {
@hasantayyar
hasantayyar / install-multithread-caffe.sh
Last active Sep 14, 2018
caffe on new ubuntu with multithread (cpu)
View install-multithread-caffe.sh
# 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.
You can’t perform that action at this time.