Skip to content

Instantly share code, notes, and snippets.

View rickmak's full-sized avatar
🎯
Focusing

Rick Mak rickmak

🎯
Focusing
View GitHub Profile

LikeCoin NFT Module Spec

Created: February 17, 2022 12:12 PM

LikeCoin NFT Module Spec

Changelog

  • 2022-02-18: Initial Draft
  • 2022-03-03: Update for feedback from LikerLand: Rename query interfaces, Include ISCN version at first mint in metadata, Clarify relation to ISCN
@rickmak
rickmak / license.py
Created November 8, 2017 08:14
Getting license from cocoapod acknowledgement
import sys
import os
import plistlib
from pprint import pprint
def get_acknowledgements(path='.'):
paths = []
for root, dirs, files in os.walk("."):
if 'Pods' in root:
@rickmak
rickmak / docker-clean.sh
Last active October 16, 2017 11:22
Daily cleanup script for docker images and containers
#!/bin/sh
echo "-- Removing exited containers --\n"
docker ps --all --quiet --filter="status=exited" | xargs --no-run-if-empty docker rm --volumes
echo "\n\n-- Removing images created older than a week --\n"
docker images | grep -v "minute\|hour\|day" | awk '{print $3}' | xargs docker rmi
@rickmak
rickmak / rest.js
Created September 4, 2017 06:33
Example implementation of restful API
'use strict';
const _ = require('lodash');
const skygear = require('skygear');
const skygearCloud = require('skygear/cloud');
const { getContainer } = require('./container');
const {
fetchSchema,
getReferenceType
} = require('./schema');
@rickmak
rickmak / aws-site-manager.log
Created October 20, 2016 03:53
Unknow error on trial with correct credentials
Detected MIME: application/octet-stream
Uploading: CHANGELOG.md as CHANGELOG.md
Compressing: README.md
Detected MIME: text/plain; charset=utf-8
Uploading: /var/folders/b2/cfpkp76j4bb1b65_00rkfyqm0000gn/T/oursky559651827 as README.md
Compressing: a.log
Compressing: bower.json
Detected MIME: text/plain; charset=utf-8
Uploading: /var/folders/b2/cfpkp76j4bb1b65_00rkfyqm0000gn/T/oursky721252509 as bower.json
Detected MIME: text/plain; charset=utf-8
@rickmak
rickmak / aws-site-manager.log
Last active October 20, 2016 03:52
403 Stack Trace on aws-site-manager
Error: AccessDenied Access Denied <nil>
AccessDenied Access Denied 403
Compressing: README.md
Compressing: a.log
Compressing: bower.json
Detected MIME: text/plain; charset=utf-8
Uploading: /var/folders/b2/cfpkp76j4bb1b65_00rkfyqm0000gn/T/oursky996853161 as bower.json
Detected MIME: application/octet-stream
Uploading: CHANGELOG.md as CHANGELOG.md
Detected MIME: text/plain; charset=utf-8
@rickmak
rickmak / stdlog.py
Created July 5, 2016 04:03
Using standard python logging
import logging
log = logging.getLogger(__name__)
log.info("I am application log")
@rickmak
rickmak / AppDelegate.m
Created June 20, 2016 05:05
How to load the previously logged in SKYKit
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[[FBSDKApplicationDelegate sharedInstance] application:application didFinishLaunchingWithOptions:launchOptions];
SKYContainer *container = [SKYContainer defaultContainer];
[container configAddress:SKYGEAR_ENDPOINT];
[container configureWithAPIKey:SKYGEAR_APIKEY];
[container loadAccessCurrentUserRecordIDAndAccessToken];
container.delegate = self;
void (^registerDevice)(void) = ^void(void) {
@rickmak
rickmak / keybase.md
Created September 4, 2015 12:21
keybase.md

Keybase proof

I hereby claim:

  • I am rickmak on github.
  • I am rickmak (https://keybase.io/rickmak) on keybase.
  • I have a public key whose fingerprint is 8E53 D55C A7E4 F528 EE12 666A 8012 BD39 CC81 327D

To claim this, I am signing this object:

@rickmak
rickmak / slack_log.py
Created March 28, 2014 12:02
Python logger for slack
import logging
import json
import requests
class SlackHandler(logging.Handler): # Inherit from logging.Handler
def __init__(self, domain, token, channel, name='LOGGER'):
logging.Handler.__init__(self)
self.domain = domain