Skip to content

Instantly share code, notes, and snippets.

View randomor's full-sized avatar

Shaomeng Zhang randomor

View GitHub Profile
@randomor
randomor / test.md
Last active November 13, 2020 20:08

uml: sequence diagram

Here I will embed PlantUML markup to generate a sequence diagram.

I can include as many plantuml segments as I want in my Markdown, and the diagrams can be of any type supported by PlantUML.

@startuml
    skinparam backgroundColor #EEEBDC
    skinparam handwritten true
 actor Customer
@randomor
randomor / App.swift
Last active February 19, 2021 20:59
SwiftUI 2020 + CloudKit + Core Data ZenJournal prototype: https://thezenjournal.com
import SwiftUI
import CoreData
let appTransactionAuthorName = "app"
@main
struct ZenJournalApp: App {
var body: some Scene {
WindowGroup {
## Intro
少蒙
https://twitter.com/@randomor
https://thezenjournal.com
https://flipgrid.com
[[#React]]
@randomor
randomor / Fastfile
Created March 10, 2019 01:33
Zenjournal Fastfile for React Native
# This file contains the fastlane.tools configuration
# You can find the documentation at https://docs.fastlane.tools
#
# For a list of all available actions, check out
#
# https://docs.fastlane.tools/actions
#
# For a list of all available plugins, check out
#
# https://docs.fastlane.tools/plugins/available-plugins
### Keybase proof
I hereby claim:
* I am randomor on github.
* I am randomor (https://keybase.io/randomor) on keybase.
* I have a public key ASDClQi_6MuyBI7WhKSvZaUNBGGTa3-c_3QbFRc3CKSiZQo
To claim this, I am signing this object:
@randomor
randomor / neo4j-cli
Created November 3, 2015 19:56 — forked from jexp/neo4j-cli
Script to start Neo4j with custom database, host and port
#!/bin/bash
echo "Usage bin/neo4j-cli [path/to/db] [host-or-ip] [port]"
DIR=${0%%neo4j-cli}
DB=${1-data/graph.db}
IP=${2-127.0.0.1}
PORT=${3-7474}
CONFIG=${DIR}../conf/neo4j-server.properties
@randomor
randomor / laravel-elixir-gulp-include
Last active August 29, 2015 14:07
For using gulp-include with laravel-elixir
//Currently I'm creating the processed coffee file in a temporary directory inside `resources/assets/coffee` for it to be picked up by `mix.coffee`
//And this task also doesn't work for js, scss or css, even though elixir does provide some native support for `@import`.
//Alternative ways of integrate `gulp-include` with `laravel-elixir` is thus deeply appreciated.
elixir.extend('includeFiles', function(src, output) {
var baseDir = this.preprocessors.baseDir + 'coffee/';
src = this.buildGulpSrc(src, baseDir, '**/*.coffee');
module ActiveAdmin
module Inputs
class FilterNumericRangeInput < ::Formtastic::Inputs::StringInput
include FilterBase
def to_html
input_wrapping do
[ label_html,
builder.text_field(gt_input_name, input_html_options(gt_input_name)),
template.content_tag(:span, "-", :class => "seperator"),
@randomor
randomor / print_github.js
Last active April 13, 2022 06:28 — forked from robcowie/print_github.js
For the new design.
javascript:(function(e,a,g,h,f,c,b,d)%7Bif(!(f=e.jQuery)%7C%7Cg%3Ef.fn.jquery%7C%7Ch(f))%7Bc=a.createElement(%22script%22);c.type=%22text/javascript%22;c.src=%22http://ajax.googleapis.com/ajax/libs/jquery/%22+g+%22/jquery.min.js%22;c.onload=c.onreadystatechange=function()%7Bif(!b&&(!(d=this.readyState)%7C%7Cd==%22loaded%22%7C%7Cd==%22complete%22))%7Bh((f=e.jQuery).noConflict(1),b=1);f(c).remove()%7D%7D;a.documentElement.childNodes%5B0%5D.appendChild(c)%7D%7D)(window,document,%221.3.2%22,function($,L)%7B$('%23header,%20.pagehead,%20.breadcrumb,%20.commit,%20.meta,%20%23footer,%20%23footer-push,%20.wiki-actions,%20%23last-edit,%20.actions,%20.header,.site-footer,.repository-sidebar,.file-navigation').remove();%20$('%23files,%20.file').css(%7B%22background%22:%22none%22,%20%22border%22:%22none%22%7D);%20$('link').removeAttr('media');%7D);
.tinypeep.top{
transform:rotate(180deg);
-ms-transform:rotate(180deg); /* IE 9 */
-moz-transform:rotate(180deg); /* Firefox */
-webkit-transform:rotate(180deg); /* Safari and Chrome */
-o-transform:rotate(180deg); /* Opera */
position: fixed;
top: -40px;
transition: all 0.3s;
-moz-transition: all 0.3s; /* Firefox 4 */