Skip to content

Instantly share code, notes, and snippets.

View qubbit's full-sized avatar
🎯
Focusing

Gopal Adhikari qubbit

🎯
Focusing
View GitHub Profile
@qubbit
qubbit / makefile
Created November 5, 2014 05:25
Makefile for compiling GLFW3 programs under Mac OS 10.10
# OBJS specifies which files to compile as part of the project
OBJS = *.c
# CC specifies which compiler we're using
CC = gcc
# INCLUDE_PATHS specifies the additional include paths we'll need
INCLUDE_PATHS = -I/usr/local/include -I/opt/X11/include
# LIBRARY_PATHS specifies the additional library paths we'll need
@qubbit
qubbit / custom
Created February 5, 2014 22:18
Custom motd file I use in my system
#!/bin/bash
echo " ";
echo " ";
echo " ███████╗██╗ ██╗ █████╗ ██╗ ██╗████████╗██╗";
echo " ██╔════╝██║ ██║██╔══██╗██║ ██╔╝╚══██╔══╝██║";
echo " ███████╗███████║███████║█████╔╝ ██║ ██║";
echo " ╚════██║██╔══██║██╔══██║██╔═██╗ ██║ ██║";
echo " ███████║██║ ██║██║ ██║██║ ██╗ ██║ ██║";
echo " ╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝ ╚═╝";
@qubbit
qubbit / list.md
Last active April 24, 2021 17:31 — forked from notwaldorf/list.md
Gopal's packing list

Gopal's packing list*

🚨

  • 🆔Wallet & Passport
  • 💧Travel water bottle
  • 💳Travel credit cards (don't pay foreign currency fees!)
  • 💳Insurance cards
  • 💵Local currency if traveling to foreign country
  • 🚎Local public transport cards
  • 📖A book/kindle
@qubbit
qubbit / gist:f1e1e783dbd241a5ac8ddb061f6d5f16
Created July 10, 2020 08:29 — forked from elnaqah/gist:5070979
cube with texture webgl tutorial
<html>
<head>
<title>Learning WebGL</title>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<script type="text/javascript" src="glMatrix-0.9.5.min.js"></script>
<script type="text/javascript" src="webgl-utils.js"></script>
<script id="shader-fs" type="x-shader/x-fragment">
export function interlace(array: any[], joiner: any): any[] {
const result: any[] = [];
if (!array || !array.length) {
return result;
}
let i;
for (i = 0; i < array.length - 1; i++) {
result.push(array[i]);
result.push(joiner);
@qubbit
qubbit / uber_monthly_totals.rb
Created October 17, 2019 18:10
Script to show my uber monthly fare total
#! /usr/bin/ruby
require 'json'
require 'time'
json = File.read('trips.json')
data = JSON(json, symbolize_names: true)
CURRENCY_CODE_MAP = {'USD'=> '$', 'EUR'=> '€', 'GBP' => '£'}
@qubbit
qubbit / hn.css
Created October 15, 2019 20:21
Stylus Theme for HackerNews
:root {
--background: #151515;
--text: #e0e0e0;
--variable: #6a9fb5;
--attribute: #00c;
--definition: #d28445;
--keyword: #ac4142;
--operator: #fff;
--property: #90a959;
--number: #aa759f;
(*
ParserLibrary.fsx
Final version of a parser library.
Related blog post: http://fsharpforfunandprofit.com/posts/understanding-parser-combinators-3/
*)
module TextInput =
open System
@qubbit
qubbit / while.ex
Created February 7, 2019 23:11 — forked from mgwidmann/while.ex
An example of metaprogramming, extending the Elixir language, to add the while keyword. Taken from Chris McCord's example in his Metaprogramming Elixir book.
# The Elixir language is very extensible to allow for future additions or
# third party developers to take the language in directions that the original
# authors could not predict.
#
# Lets start with understanding what an Elixir macro is
iex> quote do
...> 1 + 1
...> end
{:+, [context: Elixir, import: Kernel], [1, 1]}
:root {
--base03: #002b36;
--base02: #073642;
--base01: #586e75;
--base00: #657b83;
--base0: #839496;
--base1: #93a1a1;
--base2: #eee8d5;
--base3: #fdf6e3;
--yellow: #b58900;