Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Gopal Adhikari qubbit

🎯
Focusing
  • Columbus, OH
Block or report user

Report or block qubbit

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@qubbit
qubbit / uber_monthly_totals.rb
Created Oct 17, 2019
Script to show my uber monthly fare total
View uber_monthly_totals.rb
#! /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 Oct 15, 2019
Stylus Theme for HackerNews
View hn.css
:root {
--background: #151515;
--text: #e0e0e0;
--variable: #6a9fb5;
--attribute: #00c;
--definition: #d28445;
--keyword: #ac4142;
--operator: #fff;
--property: #90a959;
--number: #aa759f;
View ParserLibrary.fsx
(*
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 Feb 7, 2019 — 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.
View while.ex
# 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]}
View gist:ec6224e9de1ac29fb80d0b437a8cada6
:root {
--base03: #002b36;
--base02: #073642;
--base01: #586e75;
--base00: #657b83;
--base0: #839496;
--base1: #93a1a1;
--base2: #eee8d5;
--base3: #fdf6e3;
--yellow: #b58900;
@qubbit
qubbit / Program.cs
Last active May 26, 2018
Periodically download images and set them as wallpaper from Unsplash
View Program.cs
using Microsoft.Win32;
using System;
using System.IO;
using System.Net;
using System.Runtime.InteropServices;
using System.Windows.Forms;
using System.Linq;
using System.Collections.Generic;
using System.ComponentModel;
using System.Dynamic;
@qubbit
qubbit / list.md
Created May 24, 2018 — forked from notwaldorf/list.md
Meownica's packing list
View list.md

Meownica's packing list

I travel a lot so I'm down to like 30 minutes of packing per any kind of trip. I always bring one carry-on suitcase for any trips up to 2 weeks (that I never check in unless forced) -- I have an Away suitcase because it's got a built-in (removable) battery, and amazing wheels.

🚨

  • 🆔Wallet & Passport
  • 💧Travel water bottle
  • 💳Travel credit cards (don't pay foreign currency fees!)
  • 💳Insurance cards
  • 💵Local currency you have
  • 🚎Local public transport cards
@qubbit
qubbit / renew_certs.sh
Created Apr 6, 2018
Automatic Let's Encrypt Renewal
View renew_certs.sh
#!/usr/bin/env bash
RENEWAL_STATUS=$(certbot-auto certonly \
-d 'domain.com,sub.domain.com' \
--nginx \
-n \
--expand
)
curl -s --user 'api:key-MAILGUN_API_KEY' \
View graph.json
{
"nodes":[
{
"x":73,
"y":52,
"text":"A",
"isAcceptState":true
},
{
"x":320,
@qubbit
qubbit / index.html
Last active Feb 23, 2017
An app to test signature verification
View index.html
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<canvas id="canvas" width="500" height="500"></canvas>
</body>
<script type="text/javascript">
var signature = [[1,85,37],[0,85,35],[0,85,32],[0,85,28],[0,85,16],[0,85,9],[0,85,4],[0,85,1],[0,85,0],[0,85,2],[0,85,6],[0,85,10],[0,85,18],[0,84,21],[0,84,22],[0,84,23],[0,84,24],[0,84,27],[0,84,30],[0,83,31],[0,83,33],[0,83,34],[0,83,35],[0,82,37],[0,82,35],[0,82,33],[0,82,32],[0,82,31],[0,82,30],[0,82,29],[0,82,28],[0,82,26],[0,82,25],[0,82,24],[0,82,23],[0,82,22],[0,82,21],[0,83,21],[0,87,18],[0,90,16],[0,92,14],[0,97,11],[0,98,10],[0,100,10],[0,100,9],[0,100,8],[0,100,9],[0,100,10],[0,100,11],[0,100,16],[0,100,20],[0,100,28],[0,100,32],[0,100,36],[0,100,38],[0,100,39],[0,100,40],[0,100,41],[0,100,42],[0,100,41],[0,100,40],[0,100,38],[0,100,36],[0,100,35],[0,100,31],[0,100,25],[0,100,23],[0,100,22],[0,100,21],[0,100,20],[0,100,21],[0,100,22],[0,100,24],[0,100,25],[0,100,28],[0,100,32],[0,100,33],[0,100,34],[0,100,36],[0,100,38],[0,100,39],[0,100,40]
You can’t perform that action at this time.