Skip to content

Instantly share code, notes, and snippets.

View leopoldjoy's full-sized avatar

Leopold Joy leopoldjoy

View GitHub Profile
sudo su
# update /etc/systemd/system/iovns.env with the latest artifacts...
sed --in-place 's!IMAGE_IOVNS=.*!IMAGE_IOVNS=https://github.com/iov-one/weave/releases/download/v1.0.4/bnsd-1.0.4-linux-amd64.tar.gz!' /etc/systemd/system/iovns.env
sed --in-place 's!IMAGE_TM=.*!IMAGE_TM=https://github.com/iov-one/tendermint-build/releases/download/v0.31.12-iov1/tendermint-0.31.12-linux-amd64.tar.gz!' /etc/systemd/system/iovns.env
# ...pick-up env vars...
set -o allexport ; source /etc/systemd/system/iovns.env ; set +o allexport # pick-up env vars
# ...remove outdated binaries...
@learner-long-life
learner-long-life / Rinkeby.md
Last active August 30, 2022 22:32
How to get on Rinkeby Testnet in less than 10 minutes

How to get on Rinkeby Testnet in less than 10 minutes

Following instructions from the excellent https://www.rinkeby.io/

Synchronizing a Full Node

A full node lets you access all state. There is a light node (state-on-demand) and wallet-only (no state) instructions as well,

The manual process is a bit more tedious than when using pods, for each pod you added you have to go in XCode and add them to the build. In order to do that:

  1. Create a new group called Libraries inside XCode.
  2. Open finder in ./node_modules/react-native/Librairies.
  3. Open the corresponding folder (Core is react-native/React and not in Libraries) and drag and drop the xcodeproj into the Libraries group in XCode.
  4. Go to the build phases section of the Messages target → Link Binary With Libraries. Drag and drop the product of each xcodeproj you added (eg: libReact.a) into the Link Binary section.
  5. In Build Settings → Linking → Other Linker Flags added -lc++. This is needed in order to compile some of RN sources
  6. If you needed RCTWebSocket (which is normally used in dev) go to Libraries → RCTWebsocket.xcodeproj → Build Settings → Apple LLVM 8.0 → Custom Compiler Flags → Other warning Flags → remove -Werr.
@andrewimm
andrewimm / index.js
Created April 1, 2016 22:55
FB Send plugin in React
import React from 'react';
import ReactDOM from 'react-dom';
let fbInjected = false;
let fbLoaded = !!window.FB;
let fbCallbacks = [];
function onFbLoad() {
fbLoaded = true;
fbCallbacks.forEach((cb) => {
@dineshsprabu
dineshsprabu / forever_npm_start
Last active June 9, 2022 12:58
Forever for NPM applications starting with 'npm start'
/*
If your package.json file contains "start": "node ./bin/www"
Use the following command to bring up your app with forever
*/
forever start --minUptime 1000 --spinSleepTime 1000 ./bin/www
/* Check list of forever process using the command */
forever list
@ChALkeR
ChALkeR / grep.2015-09-21.process.binding.txt
Created September 26, 2015 13:14
lzgrep -h 'process\.binding' slim.code.ts.lzo slim.code.coffee.lzo slim.code.js.lzo (Gzemnid 2015-09-21)
ark-0.5.2.tgz/src/module.coffee:23:var Script = process.binding('evals').NodeScript;
bundlet-0.1.3.tgz/src/process.coffee:36: throw {error: 'not_supported', name: 'process.binding'}
creek-0.2.2.tgz/lib/runner.coffee:36: Script = process.binding('evals').Script
gulp-loader-1.1.2.tgz/Module.coffee:5:NativeModule = do (natives = Object.keys process.binding 'natives') ->
net-cluster-0.0.2.tgz/src/net-cluster.coffee:9:{TCP} = process.binding "tcp_wrap"
net-keepalive-0.2.7.tgz/lib/index.coffee:11: UV = process.binding? 'uv'
nice-http-0.1.0-alfa.tgz/src/_http_server.coffee:25:HTTPParser = process.binding('http_parser').HTTPParser
nodeBase-0.8.5.tgz/nodeBase-coffee.coffee:2:util = require(if process.binding('natives').util then 'util' else 'sys')
nodeBase-0.8.5.tgz/test/test-coffee.coffee:3:util = require(if process.binding('natives').util then 'util' else 'sys')
nsync-0.0.3.tgz/src/sftp.coffee:4:constants = process.binding 'constants'
@cletusw
cletusw / .eslintrc
Last active March 20, 2025 17:17
ESLint Reset - A starter .eslintrc file that resets all rules to off and includes a description of what each rule does. From here, enable the rules that you care about by changing the 0 to a 1 or 2. 1 means warning (will not affect exit code) and 2 means error (will affect exit code).
{
// http://eslint.org/docs/rules/
"ecmaFeatures": {
"binaryLiterals": false, // enable binary literals
"blockBindings": false, // enable let and const (aka block bindings)
"defaultParams": false, // enable default function parameters
"forOf": false, // enable for-of loops
"generators": false, // enable generators
"objectLiteralComputedProperties": false, // enable computed object literal property names
@koistya
koistya / App.js
Last active June 8, 2022 09:55
How to add `onscroll` event in ReactJS component
import React from 'react';
let lastScrollY = 0;
let ticking = false;
class App extends React.Component {
componentDidMount() {
window.addEventListener('scroll', this.handleScroll, true);
}
@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active April 26, 2025 08:09
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!






\

@dbainbridge
dbainbridge / app.js
Created April 19, 2012 20:48
How to use socket.io with Express 3
/**
* Module dependencies.
*/
var express = require('express')
, routes = require('./routes')
, http = require('http');
var app = express();
var server = app.listen(3000);