Skip to content

Instantly share code, notes, and snippets.

zilveer

Block or report user

Report or block zilveer

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
@zilveer
zilveer / GunDBpermissionExample.js
Created Aug 22, 2019 — forked from ThinkingJoules/GunDBpermissionExample.js
GunDB group permissions example. Restrict reads and/or writes.
View GunDBpermissionExample.js
//CLIENT
Gun.on('opt', function (ctx) {
if (ctx.once) {
return
}
this.to.next(ctx)
ctx.on('auth', function(msg){
let to = this.to
clientAuth(ctx)
function clientAuth(ctx){
View Node and Iquidus Explorer Setup for Dummies
Node / Iquidus Explorer Setup for Dummies
Pulse Crypto is used in this example.
This Tutorial is going to create a Daemon (node) and install Explorer.
THIS IS NOT GOING TO CREATE A GUI CLIENT.
Follow the instructions in [whatever coin name] docs folder Unix build - some builds are different.
I setup this up on both Ubuntu 15.10 and 16.04 with no issues.
You can create an account on vultr and get $50 free to be used in 2 months.
View keystone_roles_permissions.md

Keystone Roles & Permissions Support

The following documents the user permission support in keystone based on the support being added via PR #2111. Permissions are based on roles. If a user has a role and the list also specifies that role for any of its CRUD operations then it is permissive for the user to perform whichever CRUD operation matches the role. All users must define, at least, one role. The following are guidelines for adding role/permission support to your application:

Define a Role List Model:

@zilveer
zilveer / LocalStorage.js
Created Sep 15, 2017 — forked from anonymous/LocalStorage.js
LocalStorage JavaScript Module
View LocalStorage.js
/**
* Check if localStorage is supported const isSupported: boolean
* Check if localStorage has an Item function hasItem(key: string): boolean
* Get the amount of space left in localStorage function getRemainingSpace(): number
* Get the maximum amount of space in localStorage function getMaximumSpace(): number
* Get the used space in localStorage function getUsedSpace(): number
* Backup Assosiative Array interface Backup
* Get a Backup of localStorage function getBackup(): Backup
* Apply a Backup to localStorage function applyBackup(backup: Backup, fClear: boolean = true, fOverwriteExisting: boolean = true)
* Dump all information of localStorage in the console function consoleInfo(fShowMaximumSize: boolean = false)
@zilveer
zilveer / LocalStorage.js
Created Sep 15, 2017 — forked from CodeiSir/LocalStorage.js
LocalStorage JavaScript Module
View LocalStorage.js
/**
* Check if localStorage is supported const isSupported: boolean
* Check if localStorage has an Item function hasItem(key: string): boolean
* Get the amount of space left in localStorage function getRemainingSpace(): number
* Get the maximum amount of space in localStorage function getMaximumSpace(): number
* Get the used space in localStorage function getUsedSpace(): number
* Backup Assosiative Array interface Backup
* Get a Backup of localStorage function getBackup(): Backup
* Apply a Backup to localStorage function applyBackup(backup: Backup, fClear: boolean = true, fOverwriteExisting: boolean = true)
* Dump all information of localStorage in the console function consoleInfo(fShowMaximumSize: boolean = false)
@zilveer
zilveer / HTML5.localStorage.js
Created Sep 15, 2017 — forked from chappy84/HTML5.localStorage.js
HTML5 Storage without the restrictions on storing objects
View HTML5.localStorage.js
if (typeof HTML5 == 'undefined') {
var HTML5 = {};
}
/**
* Wrapper class to deal with easily storing values in local storage
* without having to constantly use JSON.parse and JSON.stringify everywhere
* you want to save an object.
*
* @param {String} index the base index to use in the localStorage global object
* @author Tom Chapman
@zilveer
zilveer / bind_connect.py
Created Sep 2, 2017 — forked from leonjza/bind_connect.py
Python Netcat Shell Connect
View bind_connect.py
#!/usr/bin/python
host = "127.0.0.1"
port = 4444
# try and connect to a bind shell
try:
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((host, port))
@zilveer
zilveer / file0.txt
Created Aug 27, 2017 — forked from kaishero/file0.txt
CentOS7にheroku toolbeltをインストール ref: http://qiita.com/kaishero/items/777323c4ec8f9fd425f9
View file0.txt
$ sudo wget -qO- https://toolbelt.heroku.com/install.sh | sh
$ echo 'PATH="/usr/local/heroku/bin:$PATH"' >> .bash_profile
$ source .bash_profile
$ heroku version
$ heroku login
Enter your Heroku credentials.
Email: メールアドレス
Password (typing will be hidden): パスワード
@zilveer
zilveer / partial_msig_verify.py
Created Aug 4, 2017 — forked from badmofo/partial_msig_verify.py
p2sh multisig verification test script
View partial_msig_verify.py
from pybitcointools import * # available via pip or https://github.com/vbuterin/pybitcointools
from json import dumps
# the tx you sent us
tx_hex = '0100000001f78c40e4a68a6efaea83dcc954550b0dc08b91c372d749cc0ba17934a6d618d801000000b40047304402206d805c798a0b0ae348332284435f4139aeed4935eb4c1322e8bce7d0d3e57efa0220303e13fa08326fa38143471a121cfb4bece404e1565340888587fb8f69914348814c69522103d6ab84e05bd2a9b36e09f08c43ff46358c0ef9f7bdd52ce6f6c1571de760ef852103c945afbe43b21fc864d933f498f362b682515753e9f89f71252ecb6088cc7a332103c14ed38495f194749c728ff3535f1e0286501d44735de87047ed5ef696ad1f4153aeffffffff0250c30000000000001976a914642421cbce0ac31e039ddead2207dfedd04443e488ac30750000000000001976a914c0f3ddcb9c495085252cccbd1b3e2e42d8907d0f88ac00000000'
# example: a 2 of 2 with a valid sig
#tx_hex = '01000000016dbce51ca14b5027bc714baed5bfd9218f30a83e8ef5df52cf8d530bd4627cce01000000910047304402200358faad7809a3571c36a4b18c5c47d9b28a42439d4e149725d8799e7993bf6d022073d2702eded20c9441d770b9a14a2d2b351e962f06c9a260c8fa87622af2c
@zilveer
zilveer / snakeEyes.js
Created Apr 30, 2017 — forked from damianesteban/snakeEyes.js
Dice Game in JavaScript
View snakeEyes.js
function rollSingleDice()
{
return Math.floor(Math.random()*6+1);
}
//Make the rollDice function roll dice,
//check for doubles, and return the
//total score achieved by all rolls
function rollDice(player) {
var score = 0;
You can’t perform that action at this time.