Skip to content

Instantly share code, notes, and snippets.

View raymondfeng's full-sized avatar

Raymond Feng raymondfeng

View GitHub Profile
@raymondfeng
raymondfeng / token-ids.txt
Last active July 23, 2022 15:35
Token ids for testing
0x83943171e9d102a238f87258fa40c3b79879f29e0000000000003f0000000001,0x83943171e9d102a238f87258fa40c3b79879f29e000000000000400000000001,0x83943171e9d102a238f87258fa40c3b79879f29e000000000000410000000001,0x83943171e9d102a238f87258fa40c3b79879f29e000000000000420000000001,0x83943171e9d102a238f87258fa40c3b79879f29e000000000000430000000001,0x83943171e9d102a238f87258fa40c3b79879f29e000000000000440000000001,0x83943171e9d102a238f87258fa40c3b79879f29e000000000000450000000001,0x83943171e9d102a238f87258fa40c3b79879f29e000000000000460000000001,0x83943171e9d102a238f87258fa40c3b79879f29e000000000000470000000001,0x83943171e9d102a238f87258fa40c3b79879f29e000000000000480000000001,0x83943171e9d102a238f87258fa40c3b79879f29e000000000000490000000001,0x83943171e9d102a238f87258fa40c3b79879f29e0000000000004a0000000001,0x83943171e9d102a238f87258fa40c3b79879f29e0000000000004b0000000001,0x83943171e9d102a238f87258fa40c3b79879f29e0000000000004c0000000001 0x83943171e9d102a238f87258fa40c3b79879f29e0000000000004d0000000001 0x83943171e9d102a23
did:3:bafyreihgqz6h343ryyzy43pswa22pcjm6lsnwsb3es2syxz2ebz2itikfa
@raymondfeng
raymondfeng / loopback-application.md
Last active April 30, 2021 20:21 — forked from dhmlau/loopback-application.md
Project Application Form - Work in progress
@raymondfeng
raymondfeng / loopback-crud.d.ts
Created May 2, 2016 22:36
Draft typescript definition for LoopBack CRUD methods
declare module "loopback" {
namespace db {
type Callback<T> = (err:Error|string, obj:T) => any;
type Options = Object;
type Where = Object;
/**
* Query filter
*/
export interface Filter {
@raymondfeng
raymondfeng / gist:8636789
Last active January 4, 2016 14:49
Tie-tac-toe homework
/**
* Check if the given slot is empty (no piece placed)
*/
function isEmpty(s) {
return s !== 'x' && s !== 'o';
}
/**
* Get the state for a row with three slots
*/
a {
font-size: 200%;
color: rgb(0,128,0);
}
h1 {
border:5px solid red;
box-shadow: 10px 10px 5px #888888;
}
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
<input id='num' value=10>
<input id='answer' type='text' readonly>
@raymondfeng
raymondfeng / gist:6236245
Created August 14, 2013 22:20
Uninstaller for StrongLoop Node 1.1.x
#!/bin/sh
(( ${#} > 0 )) || {
echo 'StrongLoop Node Uninstall script based on original script courtesy of Nice Robot Co.'
echo 'Press Control-C to quit now.'
read
echo 'Re-running the script with sudo.'
echo 'You may be prompted for a password.'
sudo ${0} sudo
exit $?
}
{
"initial": {
"favicon": {
},
"compress": {
"params": {
}
}
},
@raymondfeng
raymondfeng / create-admin-role.js
Created September 29, 2014 21:08
create-admin-role.js
var app = require('../app');
// Admin users
var adminUsers = require('../config/users.json').admins;
app.models.role.findOrCreate({where: {name: 'admin'}}, {name: 'admin'},
function (err, role) {
if (err) {
return console.error(err);
}