Skip to content

Instantly share code, notes, and snippets.

View niftynei's full-sized avatar
🧡
on sabbatical

neil saitug niftynei

🧡
on sabbatical
View GitHub Profile
@niftynei
niftynei / prometheus_snippet.py
Created September 24, 2019 17:38
prometheus configuration python
plugin.add_option(
    'prometheus-listen',
    '0.0.0.0:9900'
    'Address and port to bind to'
)
@niftynei
niftynei / dot.txt
Created September 5, 2019 17:39
notes from outputs investigation
wallet/db.c -> table schemas + migrations
wallet/wallet.c -> SQL statements
table: outputs
question: what are the values for 'status'
output_state_available= 0,
output_state_reserved = 1,
output_state_spent = 2,
/* Output has been included in a signed funding tx that we've shared
* with a peer; not yet mempooled. Eligible for burning */
@niftynei
niftynei / keybase.md
Created July 27, 2018 21:15
keybase keybase

Keybase proof

I hereby claim:

  • I am niftynei on github.
  • I am niftynei (https://keybase.io/niftynei) on keybase.
  • I have a public key ASCz88tHziYE6EYbvLP0MWMvS2bUUAIW3b8sfHW9oMJ94go

To claim this, I am signing this object:

@niftynei
niftynei / gist:9865193
Created March 30, 2014 00:11
Java Example using Apache's OLTU OAuth2 library
/// GENERAL METHODS FOR OAUTH'ING
/// using the Apache Oltu library
/// https://cwiki.apache.org/confluence/display/OLTU/Index
public String getAuthUrl() {
OAuthClientRequest request = null;
try {
request = OAuthClientRequest
.authorizationLocation("https://www.hackerschool.com/oauth/authorize")
@niftynei
niftynei / packages
Last active January 5, 2017 22:11
reaction crash
Error: The global definition of Mongo.Collection has changed since the job-collection package was loaded. Please ensure that any packages that redefine Mongo.Collection are loaded before job-collection.
at JobCollectionBase [as constructor] (packages/vsivsi_job-collection/src/shared.coffee:88:17)
at new JobCollection (packages/vsivsi_job-collection/src/server.coffee:27:7)
at meteorInstall.node_modules.meteor.reactioncommerce:reaction-collections.common.collections.collections.js (packages/reactioncommerce:reaction-collections/common/collections/collections.js:202:33)
at fileEvaluate (packages/modules-runtime.js:181:9)
at require (packages/modules-runtime.js:106:16)
at /home/niftynei/dev/reaction/.meteor/local/build/programs/server/packages/reactioncommerce_reaction-collections.js:1483:1
at /home/niftynei/dev/reaction/.meteor/local/build/programs/server/packages/reactioncommerce_reaction-collections.js:1510:3
at /home/niftynei/dev/reaction/.meteor/local/build/programs/server/boo
keycodes: https://gist.github.com/awidegreen/3854277
let's talk about modes!
there are 3 modes.
"n" (or normal) mode
"i" (or insert) mode
"v" (or visual) mode
keyboard shortcuts that i use a lot:
@niftynei
niftynei / git_101.md
Last active July 25, 2016 19:26
Git 101

Git 101

Hi, welcome to Git 101. Here's what we're going to learn today.

  • Making a new repo (and remotes)
  • Committing new changes
  • Branching out
  • Resolving conflicts
  • Merging vs Rebasing
@niftynei
niftynei / one_liners.erl
Created June 30, 2016 16:49
Handy Erlang One Liners
% Figure out how many messages there are in your mailbox
process_info(self(), message_queue_len).
% Register wall_clock & runtime
statistics(wall_clock), statistics(runtime).
% A function to check the next message in the mailbox
F = fun() -> receive X -> X after 0 -> no_message end end.
@niftynei
niftynei / shell_intro.md
Created April 13, 2016 19:12
intro to shell, a script

what is a shell?

Shell is a programming environment that terminal runs. it's a text based GUI for interacting with your system.

what is shell good for?

shell can give you information about your system, allows you to modify and run programs. let's try something

say "hello lisa"

package com.electricobjects.client.onboarding;
import android.app.Dialog;
import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.v4.content.ContextCompat;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;