Skip to content

Instantly share code, notes, and snippets.

Avatar
🌴

clarkzjw clarkzjw

🌴
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am clarkzjw on github.
  • I am clarkzjw (https://keybase.io/clarkzjw) on keybase.
  • I have a public key ASC_D8q6HvxZbh_EmKBeanuF9h-4vK6gAqJOkFSd7GajDgo

To claim this, I am signing this object:

@clarkzjw
clarkzjw / gist:f5c82078e0ab8b25fb455407ab17c77c
Created Aug 29, 2018
Disable GNOME Shell Animation in Ubuntu 17.04 and later
View gist:f5c82078e0ab8b25fb455407ab17c77c
gsettings set org.gnome.desktop.interface enable-animations false
View install.sh
apt-get update
apt-get install -y curl git zsh build-essential htop
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
View genesis_public_key
04b65ff15ce2b3302f960dd3f29e41e7618aebc0553051bd88e0df9c81b65c9517b5019acc3cc395e4bae94175f41d4d2e54076ee19337dc05c2653d5ccec23ffa;jjyr
View press.one
{"sig":"3483abec9a7d04ea035f782281fed007f44319d55f15cac6b5ffa98a71ea8088a6bd551429bfbffd4a03857984bfbcbdef5e2debc8f12a51294bbac0af1749020","msghash":"ed7334b763729d61b830458033b3e7d8aa673e549cd96a739c9922cdd3a2c366"}
View time.h
#include <iostream>
#include <chrono>
class TicToc
{
private:
typedef std::chrono::high_resolution_clock clock;
typedef std::chrono::microseconds res;
clock::time_point t1, t2;
@clarkzjw
clarkzjw / libimobiledevice_ifuse_Ubuntu.md
Created Feb 27, 2017 — forked from samrocketman/libimobiledevice_ifuse_Ubuntu.md
On Ubuntu 16.04, since iOS 10 update, libimobiledevice can't connect to my iPhone. This is my attempt to document a fix.
View libimobiledevice_ifuse_Ubuntu.md

Why this document?

I upgraded my iPhone 5s to iOS 10 and could no longer retrieve photos from it. This was unacceptable for me so I worked at achieving retrieving my photos. This document is my story (on Ubuntu 16.04).

The solution is to compile libimobiledevice and ifuse from source.

Setup environment

Don't forget to set up your environment before building. I typically build and install packages to my local user at $HOME/usr.

View log.py
import logging
import time
from logging.handlers import RotatingFileHandler
# ----------------------------------------------------------------------
def create_rotating_log(path):
"""
Creates a rotating log
@clarkzjw
clarkzjw / docker-compose.yml
Created Jan 10, 2017
MongoDB-Sharded-Cluster-ReplicaSet
View docker-compose.yml
version: '2'
services:
mongo-config1:
image: mongo
container_name: mongo-config1
command: [mongod, --configsvr, --replSet, my-mongo-set, --dbpath, /data/db]
ports:
- "27019"
networks:
- mongo-net
@clarkzjw
clarkzjw / docker-compose.yml
Created Jan 10, 2017
三节点MongoDB副本集
View docker-compose.yml
version: '2'
services:
mongo1:
image: mongo
container_name: mongo1
command: [mongod, --replSet, my-mongo-set, --dbpath, /data/db]
networks:
- mongo-net
mongo2:
image: mongo