Skip to content

Instantly share code, notes, and snippets.

Darcy Liu darcyliu

Block or report user

Report or block darcyliu

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
@darcyliu
darcyliu / PriorityQueue.h
Last active Nov 6, 2018
Objective-C Priority Queue
View PriorityQueue.h
//
// PriorityQueue.h
// PriorityQueue
//
// Created by Darcy Liu on 2018/11/6.
// Copyright © 2018 Darcy Liu. All rights reserved.
//
#import <Foundation/Foundation.h>
@darcyliu
darcyliu / files.go
Created Sep 17, 2018
WebDAV server in go
View files.go
// ./files -openbrowser -http=127.0.0.1:9090
package main
import (
"context"
"flag"
"net/http"
"log"
"fmt"
"net"
@darcyliu
darcyliu / clinfo.m
Created Aug 28, 2017
Retrieve OpenCL Information on OSX
View clinfo.m
//
// clinfo.m
// clinfo
//
// Created by Darcy Liu on 26/08/2017.
// Copyright © 2017 Darcy Liu. All rights reserved.
//
// clang -fobjc-arc -fmodules clinfo.m -o clinfo
@darcyliu
darcyliu / definition.m
Created Aug 18, 2017
OSX dictionary definition lookup
View definition.m
// Command-line dictionary lookup.
//
// Build with:
// clang -framework CoreServices
// clang -fobjc-arc -fmodules definition.m -o definition
#import <CoreFoundation/CoreFoundation.h>
#import <CoreServices/CoreServices.h>
@darcyliu
darcyliu / proxy.js
Created May 10, 2017
Simple HTTP Proxy
View proxy.js
var http = require('http');
var net = require('net');
var url = require('url');
function onRequest(request, response) {
console.log('request: ' + request.url);
var u = url.parse(request.url);
var options = {
hostname: u.hostname,
@darcyliu
darcyliu / openimages_dataset_downloader.py
Created Nov 16, 2016
openimages dataset downloader
View openimages_dataset_downloader.py
#!/usr/bin/env python
# encoding: utf-8
"""
openimages_dataset_downloader.py
Created by Darcy on 15/11/2016.
Copyright (c) 2016 Darcy. All rights reserved.
"""
import argparse
@darcyliu
darcyliu / centos7_samba.sh
Created Jun 10, 2016
Samba install script for CentOS 7
View centos7_samba.sh
#!/bin/sh
# Samba install script for CentOS 7
yum install -y samba samba-client samba-common
mv /etc/samba/smb.conf /etc/samba/_smb.conf
cat >> /etc/samba/smb.conf << EOF
[global]
workgroup = WORKGROUP
server string = Samba Server %v
View iOS8InternalAppIDs.txt
com.apple.SharedWebCredentialViewService
com.apple.FacebookAccountMigrationDialog
com.apple.mobilesafari
com.apple.AdSheetPhone
com.apple.share
com.apple.appleaccount.AACredentialRecoveryDialog
com.apple.Preferences
com.apple.WebContentFilter.remoteUI.WebContentAnalysisUI
com.apple.Passbook
com.apple.TrustMe
View iOS7InternalAppIDs.txt
com.apple.camera
com.apple.WebSheet
com.apple.AdSheetPhone
com.apple.Preferences
com.apple.AccountAuthenticationDialog
com.apple.social.remoteui.SocialUIService
com.apple.MobileAddressBook
com.apple.gamecenter.GameCenterUIService
com.apple.DataActivation
com.apple.TencentWeiboAccountMigrationDialog
@darcyliu
darcyliu / ace_editor.html
Last active May 23, 2016
Ace code editor
View ace_editor.html
<!DOCTYPE html>
<html lang="en">
<head>
<title>ACE in Action</title>
<link rel="stylesheet" type="text/css" href="http://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.0.0/css/bootstrap.min.css">
<style type="text/css" media="screen">
#editor {
margin: 10px 0;
height: 300px;
border-radius: 3px;
You can’t perform that action at this time.