This file contains hidden or 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
;; Adapted from https://gist.github.com/ieure/883725 for magit-log | |
(eval-after-load "magit" | |
'(progn | |
(defun magit-log-browse-github-commit (commit) | |
"Open a browser pointing to the current commit on GitHub. | |
With prefix argument, go to the commit HEAD is at." | |
(interactive "p") | |
(let* ((branch (magit-get-current-branch)) | |
(remote (and branch (magit-get "branch" branch "remote"))) |
This file contains hidden or 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
#!/bin/bash | |
alltypes="pods,po,replicationcontrollers,rc,daemonsets,ds,services,svc,events,ev,secrets,persistentvolumes,pv,persistentvolumeclaims,pvc,limitranges,limits,resourcequotas,quota,nodes,no,namespaces,ns,componentstatuses,cs,endpoints,ep,serviceaccounts,sa,securitycontextconstraints,scc,deploymentconfigs,dc,buildconfigs,bc,builds,routes,projects,imagestreams,is,imagestreamtags,istag,policies,rolebindings,users,groups,templates,policybindings,roles,oauthclients" | |
oc export ${alltypes} --all-namespaces |
This file contains hidden or 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
#!/bin/bash | |
while getopts ":l" o; do | |
case "${o}" in | |
l) | |
FROMLAST=yes | |
;; | |
esac | |
done | |
shift $((OPTIND-1)) |
This file contains hidden or 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
// -*- mode:go;mode:go-playground -*- | |
// snippet of code @ 2016-04-26 19:49:37 | |
// | |
// run snippet with Ctl-Return | |
package main | |
import ( | |
"database/sql" | |
"fmt" |
This file contains hidden or 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
#!/bin/bash | |
set -e | |
set -x | |
ARG=$1 | |
[[ -z ${ARG} ]] && exit 1 | |
BASE=$(basename ${ARG}) | |
tmpfile=/tmp/.$$.tmp.html |
This file contains hidden or 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
#!/bin/bash | |
# download episodes from readcomics.net take an episode and download it, to download full serie do things like : | |
# comics-read-comics-download.com http://www.readcomics.net/red-robin/chapter-{1..26} | |
# this uses bash/zsh nifty seq expansions it basically converts it to chapter-1 chapter-2 chapter-3 etc.. | |
set -e | |
#set -x | |
function dwl() { | |
local ARG BASE tmpfile IMAGES dirimg bimg |
This file contains hidden or 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
server { | |
listen 443 ssl; | |
listen [::]:443 ssl; | |
server_name blog.chmouel.com; | |
ssl on; | |
ssl_certificate /etc/letsencrypt/live/blog.chmouel.com/fullchain.pem; | |
ssl_certificate_key /etc/letsencrypt/live/blog.chmouel.com/privkey.pem; | |
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; |
This file contains hidden or 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
#!/bin/bash | |
WEBURL=yamaha.local | |
VOLUMESTEP=50 | |
function enrobe() { | |
local mode=$1 | |
local blob=$2 | |
[[ ${mode} == "PUT" ]] && shut="-o/dev/null" |
This file contains hidden or 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
#!/bin/bash | |
greater= # set to a price i.e: 20 | |
lower= # set to a price i.e: 10 | |
companystock= # set to a stock sympbol i.e: goog, aapl, fb (will only do for one) | |
[email protected] | |
function report() { | |
local mode=$1 | |
local target=$2 | |
local price=$3 |
This file contains hidden or 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
[Unit] | |
Description=Job that runs the python SimpleHTTPServer daemon | |
[Service] | |
Type=idle | |
WorkingDirectory=/media/bigdisk | |
ExecStart=/usr/bin/python -m SimpleHTTPServer 8888 | |
TimeoutStopSec=1 | |
Restart=always | |
RestartSec=2 |