Skip to content

Instantly share code, notes, and snippets.

Avatar
and like a thunderbolt

Nikhil Jha nikhiljha

and like a thunderbolt
View GitHub Profile
@nikhiljha
nikhiljha / server-setup.md
Created Nov 22, 2020
How to setup a Ubuntu 20.04 server with Kubernetes + CRI-O + Cilium
View server-setup.md

server-setup.md

How to setup a Ubuntu 20.04 server with Kubernetes + CRI-O + Cilium

Networking

vim /etc/netplan/01-netcfg.yaml # optional, if DHCP isn't good enough

CRI-O Installation

@nikhiljha
nikhiljha / feedbackd.spec
Created Mar 1, 2020
Feedbackd for Fedora
View feedbackd.spec
Name: feedbackd
# This is the "stable" version that other projects (such as phosh 0.2.0) depend on.
Version: 0.0.0+git20200214
Release: 0%{?dist}
Summary: Feedback library for GNOME
License: GPLv3+
URL: https://source.puri.sm/Librem5/feedbackd
Source0: https://source.puri.sm/Librem5/feedbackd/-/archive/v%{version}/%{name}-v%{version}.tar.gz
@nikhiljha
nikhiljha / rust-xkbcommon.spec
Created Feb 29, 2020
rust-xkbcommon for Fedora
View rust-xkbcommon.spec
# Generated by rust2rpm 13
%bcond_without check
%global debug_package %{nil}
%global crate xkbcommon
Name: rust-%{crate}
Version: 0.4.0
Release: 1%{?dist}
Summary: Rust bindings and wrappers for libxkbcommon
View 0001-upgrade-dependencies.patch
From c8075c4396c04b3a6778b4ed6d5c21b20999ef77 Mon Sep 17 00:00:00 2001
From: Nikhil Jha <hi@nikhiljha.com>
Date: Fri, 28 Feb 2020 19:49:49 -0800
Subject: [PATCH] upgrade dependencies
---
Cargo.lock | 340 ++++++++++++++++++++++++++++++++-----------------
Cargo.toml | 4 +-
src/popover.rs | 6 +-
src/style.rs | 4 +-
@nikhiljha
nikhiljha / ansible_playbook.yml
Created May 2, 2019
GlusterFS Ansible Setup
View ansible_playbook.yml
---
- hosts: gluster
become: true
vars:
gluster_mount_dir: /mnt/g1
gluster_brick_dir: /bricks/brick1
gluster_brick_name: g1
tasks:
- name: Install parted
View main.dart
import 'dart:convert';
void main() {
List decoded = json.decode("""[
{
"date": "2018-08-23 08:00:00",
"end": "2018-08-23 08:25:00",
"info": "Advisement",
"isclass": "1",
@nikhiljha
nikhiljha / keybase.md
Created Mar 3, 2018
My keybase proof.
View keybase.md

Keybase proof

I hereby claim:

  • I am nikhiljha on github.
  • I am njha (https://keybase.io/njha) on keybase.
  • I have a public key ASDgeQRDhU2laLsahH4HmrkgATkmbhJzoyNQUQEqEuA2fgo

To claim this, I am signing this object:

@nikhiljha
nikhiljha / spyfallcheat.user.js
Created Nov 6, 2016
Cheat at crabhat's spyfall if you want.
View spyfallcheat.user.js
// ==UserScript==
// @name SpyFall Cheater
// @namespace http://nikhiljha.com/
// @version 0.2
// @description Win every game of spyfall, every time.
// @author Nikhil Jha
// @match http://spyfall.crabhat.com/*/
// @grant none
// ==/UserScript==
View aops.user.js
// ==UserScript==
// @name AoPS Downloader
// @namespace http://www.artofproblemsolving.com/
// @version 0.0.1
// @description Download the AoPS WOOT (or other classes) transcripts!
// @author Nikhil Jha
// @match http://www.artofproblemsolving.com/class/*/transcript/*
// @grant none
// ==/UserScript==
@nikhiljha
nikhiljha / AddCookiesInterceptor.java
Created Jul 29, 2016
Retrofit2/OkHttp3 Cookies (Drag and Drop, One Size Fits 99%)
View AddCookiesInterceptor.java
// Original written by tsuharesu
// Adapted to create a "drop it in and watch it work" approach by Nikhil Jha.
// Just add your package statement and drop it in the folder with all your other classes.
import android.content.Context;
import android.preference.PreferenceManager;
import android.util.Log;
import java.io.IOException;
import java.util.HashSet;