Skip to content

Instantly share code, notes, and snippets.


Fizer Khan (பைசர் கான்) fizerkhan

View GitHub Profile
ityonemo /
Last active Jun 12, 2021
Zig in 30 minutes

A half-hour to learn Zig

This is inspired by


the command zig run my_code.zig will compile and immediately run your Zig program. Each of these cells contains a zig program that you can try to run (some of them contain compile-time errors that you can comment out to play with)

augfrank / Email-verifier.js
Created Dec 9, 2016
Google Sheet script to verify email addresses automatically
View Email-verifier.js
* A custom function that verifies an email ID
* @param {String} email ID
* @return {Boolean} If the email ID is active
* @customfunction
function verifyEmail(email) {
// Replace this with your API key
stephenturner /
Last active Sep 23, 2020
Installing gcc 4.8 and Linuxbrew on CentOS 6

Installing gcc 4.8 and Linuxbrew on CentOS 6

The GCC distributed with CentOS 6 is 4.4.7, which is pretty outdated. I'd like to use gcc 4.8+. Also, when trying to install Linuxbrew you run into a dependency loop where Homebrew's gcc depends on zlib, which depends on gcc. Here's how I solved the problem.

Note: Requires sudo privileges.


jeanlescure /
Last active Jun 3, 2021
Ubuntu/Debian Offline Repository Creation

Ubuntu/Debian Offline Repository Creation Gist

When I googled how to create my own offline repository of packages for use in an offline Ubuntu/Debian machine, the results where disheartening and the steps to be taken scattered all over the place.

The files within this gist will allow you to:

  • Download specific apt-get packages... with dependencies included!
  • Create a Packages.gz file so that you can add the repository folder you create to the target machine's /etc/apt/sources.list file.

Before using

View TwentyBot
function countPieces() {
it = b.pieces();
var i = 0;
while (it.current()){ i++; }
return i;
function getRandPiece() {
var it = b.pieces();
var n = Math.floor(Math.random()*countPieces());
chrismdp /
Last active May 9, 2021
Uploading to S3 in 18 lines of Shell (used to upload builds for
# You don't need Fog in Ruby or some other library to upload to S3 -- shell works perfectly fine
# This is how I upload my new Sol Trader builds (
# Based on a modified script from here:
S3KEY="my aws key"
S3SECRET="my aws secret" # pass these in
function putS3
View index.html
<!DOCTYPE html>
<meta charset="utf-8">
<title>JS Bin</title>
<div class="steps">
<a href="" class="step step1">1</a>
<div class="line line1"></div>
<a href="" class="step step2">2</a>
<div class="line line2"></div>
GABeech / haproxy.cfg
Created Aug 21, 2014
Stack Exchange HAProxy
View haproxy.cfg
# This is an example of the Stack Exchange Tier 1 HAProxy config
# The only things that have been changed from what we are running are:
# 1. User names have been removed
# 2. All Passwords have been remove
# 3. IPs have been changed to use the example/documentation ranges
# 4. Rate limit numbers have been changed to randome numbers, don't read into them
userlist stats-auth
group admin users $admin_user
user $admin_user insecure-password $some_password
abyx / angular-error-handling.js
Last active Oct 11, 2020
AngularJS HTTP Error Handling Mechanism
View angular-error-handling.js
var HEADER_NAME = 'MyApp-Handle-Errors-Generically';
var specificallyHandleInProgress = false;
angular.module('myApp').factory('RequestsErrorHandler', ['$q', function($q) {
return {
// --- The user's API for claiming responsiblity for requests ---
specificallyHandled: function(specificallyHandledBlock) {
specificallyHandleInProgress = true;
try {
return specificallyHandledBlock();
kayalshri / thirukural
Created Apr 3, 2014
Thirukural with Meanings read from JSON
View thirukural
<script type="text/javaScript">
$.getJSON("<?php echo $start;?>-<?php echo $end;?>?appid=m8gzum7bzuank&format=json&jsoncallback=?", function(data){
var result="";
$.each(data.KuralSet.Kural, function(i,Kural){
result += "#"+Kural.Number+"<br>"+Kural.Line1+"<br>"+Kural.Line2+"<br><span class='label-warning'> "+Kural.Translation+"</span><br><BR>";