Instantly share code, notes, and snippets.

#!/usr/bin/env bash
# BashBlog, a simple blog system written in a single bash script
# (C) Carlos Fenollosa <>, 2011-2016 and contributors
# Check out for more details
# Global variables
# It is recommended to perform a 'rebuild' after changing any of this in the code
View languages.txt
1. Clojure/Chicken Scheme -
When you want to have fun with programming (Clojure & Scheme is still pretty productive, IMHO)
2. C -
When you want to implement a bootloader, kernel, OS, memory manager and low-level
stuff you wanna program, and ubiquitous C APIs/libraries.
3. Python -
When you simply want to get the job done with vast amount of libraries
while enjoying the formalism, and expressiveness of the language.
View chucker.scm
(use tcp
;; port-open? : string integer -> boolean
(define (port-open? host port)
(tcp-connect host port)
View c-style.txt
Note that the following are guidelines and the most important aspect of style is consistency.
Strive to keep your style consistent with the project on which you are working.
Recommended Reading
The following contain good information, some of which is repeated below, some of which is contradicted below.
View .perltidyrc
# indentation spaces [3/307]
# broken line indentation spaces
# length of collumn
# spaces in parentheses
View .Xresources
xterm*VT100.Translations: #override \
Ctrl Shift <Key>V: insert-selection(CLIPBOARD) \n\
Ctrl Shift <Key>C: copy-selection(CLIPBOARD)
xterm*background: black
xterm*foreground: lightgray
View .emacs
(require 'package)
(let* ((no-ssl (and (memq system-type '(windows-nt ms-dos))
(not (gnutls-available-p))))
(proto (if no-ssl "http" "https")))
;; Comment/uncomment these two lines to enable/disable MELPA and MELPA Stable as desired
;;(add-to-list 'package-archives (cons "melpa" (concat proto "://")) t)
;;(add-to-list 'package-archives (cons "melpa-stable" (concat proto "://")) t)
(add-to-list 'package-archives
'("melpa" . ""))
(when (< emacs-major-version 24)
View .gitignore
View kwargs_1
# python
def printArgs(*args, **kwargs):
print kwargs
>>> printArgs(a=1, b=2)
{'a': 1, 'b': 2}
# perl
use Data::Dumper;
sub printArgs {
use DBI;
use v5.10;
# dependencies: DBI, DBD::mysql, libmysqlclient-dev, mysql-server
# to create a new database, use 'mysqladmin create my_database_name -u username -p'
# default mysql port is 3306
my $dbh = DBI->connect("dbi:mysql:database=dummy;host=localhost",
"root", "my_password");