Skip to content

Instantly share code, notes, and snippets.

View isa's full-sized avatar
☀️
Working, whatd'ya think..

Isa Goksu isa

☀️
Working, whatd'ya think..
View GitHub Profile
@isa
isa / Dockerfile
Created October 12, 2020 15:00 — forked from davidcarboni/Dockerfile
Flask in Docker - productionised with simplicity
FROM python
# From the python:onbuild image
# For discussion of onbuild variant images see: https://hub.docker.com/_/python/
WORKDIR /usr/src/app
COPY . /usr/src/app
RUN pip install --no-cache-dir -r requirements.txt
# Install uWSGI
RUN pip install uwsgi
function ll
command /opt/homebrew/opt/coreutils/libexec/gnubin/ls --color=auto -Falh --group-directories-first $argv
end
function wget
command wget -cq --show-progress $argv
end
function myip
command dig +short myip.opendns.com @resolver1.opendns.com
@isa
isa / ds
Last active August 29, 2015 14:09
Directory Usage script made pure with Unix functions
#!/bin/sh
find ${1:-.} -type f -exec ls -lnq {} \+ | awk '
function pp() {
u="+Ki+Mi+Gi+Ti";
split(u,unit,"+");
v=sum;
r=0;
for(i=1;i<5;i++) {
if(v<1024) break;
r=v%1024;
#!/bin/sh
# The bandwidth to simulate, here about 56kilobit per second. This is layer 2 bandwidth, so TCP/UDP and IP overhead will apply
BW="56kbps"
# _Half_ the latency that we aim for. Since this applies to both the WAN port and Wi-Fi, the delay is applied twice, so this actually puts it at around 120+ms
LATENCY="60ms"
# Chance of packet loss. Also applied to both interfaces, so it is 1%.
LOSS="0.5%"
# The device name of your wifi device.
WIFI="wlan0"
@isa
isa / gist:5727570
Created June 7, 2013 07:24 — forked from anonymous/gist:2523336
Change the author info of a git repo
#!/bin/sh
git filter-branch --env-filter '
an="$GIT_AUTHOR_NAME"
am="$GIT_AUTHOR_EMAIL"
cn="$GIT_COMMITTER_NAME"
cm="$GIT_COMMITTER_EMAIL"
if [ "$GIT_COMMITTER_EMAIL" = "[email protected]" ]
#!/bin/sh
# This program has two feature.
#
# 1. Create a disk image on RAM.
# 2. Mount that disk image.
#
# Usage:
# $0 <dir> <size>
#
@isa
isa / index.html
Created February 9, 2013 22:08
A CodePen by Isa Goksu. CSS3 Working Analog Clock - Working CSS3 analog clock, using CSS animations and shapes, without any images or JavaScript.
<div id="watch">
<div class="frame-face"></div>
<ul class="minute-marks">
<li></li><li></li><li></li><li></li><li></li><li></li>
<li></li><li></li><li></li><li></li><li></li><li></li>
<li></li><li></li><li></li><li></li><li></li><li></li>
<li></li><li></li><li></li><li></li><li></li><li></li>
<li></li><li></li><li></li><li></li><li></li><li></li>
<li></li><li></li><li></li><li></li><li></li><li></li>
<li></li><li></li><li></li><li></li><li></li><li></li>
@isa
isa / gist:4713014
Created February 5, 2013 08:10
capybara-webkit with xvfb
Webkit needs an X server in order to be able to render. If you're running on any Linux server distribution then you won't have an X server running. You can use the xvfb package to generate a virtual framebuffer for the duration of your tests. For example:
DISPLAY=localhost:1.0 xvfb-run cucumber
If you are running this on a build server you might have something like this:
DISPLAY=localhost:1.0 xvfb-run cucumber -p default -f junit -o cucumber
@isa
isa / tomcat.sh
Last active December 12, 2015 00:48
Tomcat service script for RHEL/CentOS and Ubuntu
#!/bin/env bash
# chkconfig: 2345 80 05
# description: Starts and stops the Tomcat
#
# if you are doing tomcat instancing, you might wanna check the CATALINA_PID logic down here to create something more dynamic behavior
# other than that just add this file under /etc/init.d/ as tomcat and use chkconfig to configure
#
# chkconfig --add tomcat
# chkconfig --level 2345 tomcat on
# chkconfig --list tomcat