Skip to content

Instantly share code, notes, and snippets.

@kiwina
kiwina / gist:f913d10bcd186e44e2d395e28df64b01
Created March 14, 2024 03:06
Export exodus polkadot account and generate a backup.json file to import in NOVA Wallet or others
// package.json
{
"dependencies": {
"@polkadot/keyring": "^12.6.2",
"@polkadot/util-crypto": "^12.6.2"
}
}
// index.js
const { Keyring } = require('@polkadot/keyring');
@kiwina
kiwina / jsdoc.diff
Created June 10, 2021 18:21
jsdoc patch for use with probufjs and yarn 2
diff --git a/cli.js b/cli.js
index b1de34de69cc46e98b25c9f3932571398bb1a9a8..df8a7fb747f305522c3d5f2c162144ae7f775a66 100644
--- a/cli.js
+++ b/cli.js
@@ -10,10 +10,10 @@
* @private
*/
module.exports = (() => {
- const app = require('jsdoc/app');
- const env = require('jsdoc/env');
@kiwina
kiwina / fast-firefox
Created July 9, 2016 09:15 — forked from amorgner/fast-firefox
Some config options to make Firefox faster (updated)
Over time, I collected some options to make Firefox really fast.
WARNING! NO WARRANTY, use on your own risk!
If you know what you're doing, go to 'about:config' and edit the listed values accordingly.
Hint: Double-click boolean values to toggle true/false.
###########################
If mouse-wheel scrolling is slow, try
@kiwina
kiwina / nginx
Last active August 29, 2015 14:26 — forked from vdel26/nginx
Openresty init.d script
#!/bin/sh
#
# chkconfig: 2345 55 25
# Description: Nginx init.d script, put in /etc/init.d, chmod +x /etc/init.d/nginx
# For Debian, run: update-rc.d -f nginx defaults
# For CentOS, run: chkconfig --add nginx
#
### BEGIN INIT INFO
# Provides: nginx
# Required-Start: $all
@kiwina
kiwina / gist:4e49ce9e0bf8e46e8e46
Last active August 29, 2015 14:26 — forked from jedi4ever/gist:903751
Tuning stuff for Ubuntu hosts
# /etc/security/limits.conf
* soft nofile 999999
* hard nofile 999999
root soft nofile 999999
root hard nofile 999999
===========================================================
# /etc/sysctl.conf
# sysctl for maximum tuning
local path = ngx.var.request:split(" ")[2] -- path
local t={}
local cjson = require "cjson"
local m = ngx.re.match(path,[=[^/sentence/(.+)]=])
local words = m[1]:split("%%20") -- words in the sentence
for i,k in pairs(words) do
local res_word = ngx.location.capture("/real/".. k )
local value=cjson.new().decode(res_word.body)
table.insert(t, value.sentiment)
@kiwina
kiwina / config.lua
Created September 15, 2013 04:08 — forked from kidd/config.lua
config = {
nick = "my-nick123",
autoReconnect=true,
host="irc.freenode.org",
port=6667,
ident="my-nick123",
realname="my-nick123",
channels={"#lua"},
modules = {'roll'},
}