View .emacs
(require 'package) ;; You might already have this line
(let* ((no-ssl (and (memq system-type '(windows-nt ms-dos))
(not (gnutls-available-p))))
(url (concat (if no-ssl "http" "https") "://melpa.org/packages/")))
(add-to-list 'package-archives (cons "melpa" url) t))
(when (< emacs-major-version 24)
;; For important compatibility libraries like cl-lib
(add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/")))
(package-initialize) ;; You might already have this line
View .gitignore
# http://www.gnu.org/software/automake
torios_internet*
Makefile
Makefile.in
config.*
*.zip
*.tar.gz
.deps
.objs
*~
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 {
View access.pl
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");
View torchecker.pl
#!/usr/bin/env perl
use warnings;
use LWP::Simple 'get';
use Mojo::DOM;
use v5.10;
my $dom = Mojo::DOM->new(get "https://check.torproject.org");
say $dom->at('title')->text;
View MITLICENSE
Copyright 2017 faraco <skelic3@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR T
View configmuttrc.bash
#!/bin/bash
<< MIT_LICENSE_NOTICE
Copyright 2016 faraco <skelic3@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
# Copyright 2016 faraco <skelic3@gmail.com>
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
View install.bash
#!/bin/bash
PACKAGE_VER=App-Pastebin-Create-1.0105.tar.gz
PACKAGE_TAG_VER=1.0105
read -p "You are about to installing $PACKAGE_VER from https://github.com/faraco/apc/ to $PERL_LOCAL_LIB_ROOT. Proceed (y/n)? " userInput
case $userInput in
y|yes|Yes|YES)
wget -c https://github.com/faraco/apc/releases/download/$PACKAGE_TAG_VER/$PACKAGE_VER && cpanm $PACKAGE_VER; rm $PACKAGE_VER
View shellcheck_curl.sh
#!/bin/sh
<< END_COMMENT
Example usage: ./shellcheck_curl.sh https://gist.githubusercontent.com/faraco/bbfaf1a60528caa07abde974353a3b5a/raw/9db205420029c1145da94fe0c325c1bded42c71b/shellcheck_curl.sh
END_COMMENT
curl "$1" > tmpFile;
shellcheck tmpFile;
View showrgb2hex.bash
#!/bin/bash
# FIXME some of the hexcodes shown up as 4 and 5 digit number instead of 6.
showrgb | awk '{printf "#%x%x%x\t\t%s\n", $1, $2, $3, $4}'