Skip to content

Instantly share code, notes, and snippets.

View liushooter's full-sized avatar

Shooter liushooter

View GitHub Profile
@tianyuf
tianyuf / baidu-as-a-network-utility.css
Created May 14, 2016 15:03
BaaN: Baidu as a Network Utility - 百度的实用主义方法论.
@-moz-document domain("baidu.com") {
body {
display: none;
}
html {
margin: 30px;
}
html::after {
@hlissner
hlissner / codesign_gdb.md
Last active March 11, 2024 07:09
Codesign gdb on OSX
@bishboria
bishboria / springer-free-maths-books.md
Last active April 25, 2024 06:27
Springer made a bunch of books available for free, these were the direct links
@cem2ran
cem2ran / main.js
Created December 28, 2015 01:10
React Getting Started - How it should be!
import React from 'react'
import ReactDOM from 'react-dom'
const Hello = ({name}) => <h1>Hello {name}!</h1>
ReactDOM.render(
<Hello name={"vjeux"}/>,
document.body.appendChild(document.createElement("div"))
)
# Requires Python 2.x, flask and pywin32
from flask import Flask
import flask
import win32com.client
import pythoncom
import os, os.path, sys, time
# Flask (Web Server)
ws = Flask(__name__)
Intent intent = new Intent(Intent.ACTION_VIEW);
ComponentName cn = new ComponentName("com.tencent.mm", "com.tencent.mm.plugin.base.stub.WXCustomSchemeEntryActivity");
intent.setData(Uri.parse("weixin://dl/moments"));
intent.setFlags(Intent.FLAG_ACTIVITY_PREVIOUS_IS_TOP);
intent.setComponent(cn);
startActivity(intent);
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Language.Brainfuck.Parser
(parse)
where
import Control.Monad.Except
import Control.Monad.State
data ParseError = Unexpected Char
@zlx
zlx / creation_time.rb
Last active December 15, 2015 12:16
Get file creation time
# 支持 MacOS, ext4 文件系统的 Linux
# 参考:http://moiseevigor.github.io/software/2015/01/30/get-file-creation-time-on-linux-with-ext4/
#
def creation_time(file_path)
case RUBY_PLATFORM
when /bsd/, /darwin/
return %x{mdls -raw -name kMDItemFSCreationDate #{file_path}}
when /linux/
inode = %x{ls -di "#{file_path}" | cut -d ' ' -f 1}.strip
fs = %x{df "#{file_path}" | tail -1 | awk '{print $1}'}.strip
@hoffmabc
hoffmabc / gist:38883a3fb08f26b80330
Last active May 22, 2016 07:28
OpenBazaar REST API
swagger: '2.0'
info:
title: OpenBazaar API
description: Let's make trade free
version: "1.0.0"
# the domain of the service
host: localhost
# array of all schemes that your API supports
schemes:
- http
@rarylson
rarylson / automator_new_file.scpt
Last active March 1, 2024 01:03
AppleScript to create a new file in Finder (to be used in Automator)
-- AppleScript to create a new file in Finder
--
-- Use it in Automator, with the following configuration:
-- - Service receives: no input
-- - In: Finder.app
--
-- References:
-- - http://apple.stackexchange.com/a/129702
-- - http://stackoverflow.com/a/6125252/2530295
-- - http://www.russellbeattie.com/blog/fun-with-the-os-x-finder-and-applescript