Skip to content

Instantly share code, notes, and snippets.

#include <stdio.h>
int main() {
FILE *fp;
fp = fopen("true_colour.txt", "w");
int r = 255;
int g = 255;
int b = 255;
#!/bin/bash
# BWTU (Bash-Wget-Twitter-Updater)
# DATE AND TIME.
CURRENT_DATE=$(date "+%A %Y%m%d %H:%M:%S")
UTC_DATE=$(date -u "+%A %Y%m%d %H:%M:%S")
# CD TO /var/tmp
cd /var/tmp
@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
@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 / 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;
#!/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('\\','/')
#!/bin/bash
#SCRIPT_NAME=$(echo $0 | grep -E -o "[^/]+$")
SCRIPT_NAME="$(basename "$0")"
WKDIR="$(dirname "$0")"
ARG1=$1
ARG2=$2
ARG3=$3
# USAGE
# 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
if [ -z $1 ]; then
echo "specify file name"
exit 1
fi
bzip2 -dc $1 | tar xvf -
#!/bin/bash
if [ -z $1 ]; then
echo "specify file name"
exit 1
fi
gzip -dc $1 | tar -xvf -