Skip to content

Instantly share code, notes, and snippets.

@mikequentel
mikequentel / .bash_profile
Created December 9, 2015 21:09
Dependency of .bashrc
if [ -f ~/.bashrc ]; then . ~/.bashrc; fi
#!/bin/bash
if [ -z $1 ]; then
echo "specify path"
exit 1
fi
TARGETPATH=$1
tar cvf - ${TARGETPATH} | gzip -9 - > ${TARGETPATH}.tar.gz
#!/bin/bash
if [ -z $1 ]; then
echo "specify file name"
exit 1
fi
gzip -dc $1 | tar -xvf -
#!/bin/bash
if [ -z $1 ]; then
echo "specify file name"
exit 1
fi
bzip2 -dc $1 | tar xvf -
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
alias cp='cp -i'
# alias ct='cleartool'
alias h='history'
alias l='ls -hal'
alias mkdir='mkdir -p'
#!/bin/bash
#SCRIPT_NAME=$(echo $0 | grep -E -o "[^/]+$")
SCRIPT_NAME="$(basename "$0")"
WKDIR="$(dirname "$0")"
ARG1=$1
ARG2=$2
ARG3=$3
# USAGE
#!/bin/python
import sys
import os
import argparse
import getpass
from datetime import datetime
def about():
script_dir = os.path.dirname(os.path.realpath(inspect.getfile(inspect.currentframe()))).replace('\\','/')
@mikequentel
mikequentel / rgb.adb
Created December 10, 2014 09:33
How to Create a Text File List of RGB Values in Ada
with Ada.Text_IO; use Ada.Text_IO;
with Ada.Integer_Text_IO; use Ada.Integer_Text_IO;
with Ada.Strings; use Ada.Strings;
with Ada.Strings.Fixed; use Ada.Strings.Fixed;
procedure rgb is
subtype Rgb_Int is integer range 0..255;
fp: File_Type;
@mikequentel
mikequentel / rgb.nim
Last active August 29, 2015 14:10
How to Create a Text File List of RGB Values in Nim (aka Nimrod)
proc main() =
var fp = open("true_colour_nimrod.txt", fmWrite)
var r = 255
var g = 255
var b = 255
for r in countdown(255, 0):
for g in countdown(255, 0):
@mikequentel
mikequentel / github_typical_workflow.txt
Created December 5, 2014 04:21
ASCII text diagram of GitHub typical workflow
github.com server-side repos
+-------------------+ +------------------+
| Source Repo | |My fork of Source |
|-------------------| fork |------------------|
| +----->| |
| |<-----+ |
+-------------------+ pull +----+-------------+
request | ^ push