I hereby claim:
- I am shahinism on github.
- I am shahinism (https://keybase.io/shahinism) on keybase.
- I have a public key ASA3hKKoVgWQkZF3Vcdx7BEicBdNus57GHKa0GM34xIw_wo
To claim this, I am signing this object:
# Determine the time since last commit. If branch is clean, | |
# use a neutral color, otherwise colors will vary according to time. | |
function git_time_since_commit() { | |
if git rev-parse --git-dir > /dev/null 2>&1; then | |
# Only proceed if there is actually a commit. | |
if [[ $(git log 2>&1 > /dev/null | grep -c "^fatal: bad default revision") == 0 ]]; then | |
# Get the last commit. | |
last_commit=`git log --pretty=format:'%at' -1 2> /dev/null` | |
now=`date +%s` | |
seconds_since_last_commit=$((now-last_commit)) |
echo "This gist have not to be executed directly" | |
exit 0 | |
# Edit `/etc/default/ufw` and set: | |
# DEFAULT_FORWARD_POLICY="ACCEPT" | |
# The restart ufw | |
systemctl restart ufw | |
# Install ufw from command line | |
apt install ocserv |
I hereby claim:
To claim this, I am signing this object:
-- vim: ts=4 sw=4 noet ai cindent syntax=lua | |
conky.config = { | |
------------------------------ | |
-- Generic | |
------------------------------ | |
background = true, | |
update_interval = 1, | |
double_buffer = true, |
[Background] | |
Color=40,42,54 | |
[BackgroundFaint] | |
Color=40,40,40 | |
[BackgroundIntense] | |
Color=40,40,40 | |
[Color0] |
#!/bin/bash | |
# USAGE: | |
# Download insplash.sh | |
# chmod +x instplash.sh | |
# ./insplash.sh COLLECTION_URL | |
# ./insplash.sh https://unsplash.com/collections/279087/weather-and-sky | |
PATTERN='http:\/\/unsplash.com\/photos\/[[:alnum:]]*\/download' | |
COUNT=1 | |
curl -s $1 | grep -o $PATTERN | while read -r LINK; do | |
aria2c -x16 -o "image.${COUNT}.jpeg" $LINK |
#!/bin/bash | |
find_or_install() { | |
# Check if brew package $1 is installed | |
# http://stackoverflow.com/a/20802425/1573477 | |
if brew ls --versions $1 > /dev/null; then | |
echo "Installing ${1}" | |
brew install $1 | |
else | |
echo "${1} is already installed." |
#!/bin/bash | |
# Description: | |
# After generating project using express-generator, you can use | |
# this script to transform codes to ES6 syntax and standard lint | |
# friendly base. | |
# | |
# Requirements: | |
# You need following packages for this script to work: | |
# - express-generator | |
# - lebab |
// ==UserScript== | |
// @name Slack Bidirectional Text (Add RTL support to slack) | |
// @namespace http://bit.ly/2kHm59H | |
// @version 1.0 | |
// @description Set auto direction for all message boxes | |
// @author Shahin | |
// @include https://*.slack.com/* | |
// @grant none | |
// ==/UserScript== | |
(function() { |