Skip to content

Instantly share code, notes, and snippets.

🍃
Waiting for autumn

Wang Dàpéng wong2

🍃
Waiting for autumn
Block or report user

Report or block wong2

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
View safari_reader.js
/*
* Copyright (c) 2010 Apple Inc. All rights reserved.
*/
function characterNeedsScoreMultiplier(e) {
if (!e || e.length === 0)
return !1;
var t = e.charCodeAt(0);
return t > 11904 && t < 12031?!0 : t > 12352 && t < 12543?!0 : t > 12736 && t < 19903?!0 : t > 19968 && t < 40959?!0 : t > 44032 && t < 55215?!0 : t > 63744 && t < 64255?!0 : t > 65072 && t < 65103?!0 : t > 131072 && t < 173791?!0 : t > 194560 && t < 195103?!0 : !1
}
function domDistance(e, t, n) {
View downloader.exs
#!/usr/bin/env elixir
defmodule Committer do
defstruct [:name, :email]
def list(repo) do
repo
|> from_repo
|> Stream.unfold(fn str ->
case String.split(str, "\n", parts: 2, trim: true) do
View ChecklistApp.js
'use strict';
var React = require('react-native');
var {
Bundler,
StyleSheet,
Text,
TouchableHighlight,
View,
ScrollView,
View gist:598fa75e22bdfa44cf47

2015-01-29 Unofficial Relay FAQ

Compilation of questions and answers about Relay from React.js Conf.

Disclaimer: I work on Relay at Facebook. Relay is a complex system on which we're iterating aggressively. I'll do my best here to provide accurate, useful answers, but the details are subject to change. I may also be wrong. Feedback and additional questions are welcome.

What is Relay?

Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).

@andelf
andelf / macos_wifi_weak_password_scanner.py
Created Jan 18, 2014
macos Wifi 弱密码连接器。因为没写切channel的功能,所以多执行几遍就好。
View macos_wifi_weak_password_scanner.py
#!/usr/bin/python
# -*- coding: utf-8 -*-
import os
from commands import getstatusoutput, getoutput
WIFI_IF = "en0"
class Wifi(object):
@bomberstudios
bomberstudios / sketch-plugins.md
Last active Feb 13, 2019
A list of Sketch plugins hosted at GitHub, in no particular order.
View sketch-plugins.md
@JoelBesada
JoelBesada / README.md
Last active Sep 1, 2019
Backtick Example Command
View README.md

This is an example command for Backtick. A Backtick command consists of some executable JavaScript and a bit of metadata in JSON.

Here are the required steps to create a command:

  1. Create a new Gist with a command.js and command.json file, or simply fork this one.

  2. Write your JavaScript in command.js. This will be injected into and executed on the page the user is currently on when they run it.

  3. Add some metadata to the command.json file:

  • name: The name of the command.
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active Oct 14, 2019
A badass list of frontend development resources I collected over time.
View frontendDevlopmentBookmarks.md
@olasitarska
olasitarska / pgessays.py
Created Nov 18, 2012
Builds epub book out of Paul Graham's essays.
View pgessays.py
# -*- coding: utf-8 -*-
"""
Builds epub book out of Paul Graham's essays: http://paulgraham.com/articles.html
Author: Ola Sitarska <ola@sitarska.com>
Copyright: Licensed under the GPL-3 (http://www.gnu.org/licenses/gpl-3.0.html)
This script requires python-epub-library: http://code.google.com/p/python-epub-builder/
"""
@ravageralpha
ravageralpha / fetchsub.sh
Created Oct 27, 2012
shell script get subtitle from shooter.cn
View fetchsub.sh
#!/bin/sh
# Author: RA <ravageralpha@gmail.com>
USAGE(){
echo "Usage:$(basename $0) [eng] files..."
}
[ $# -eq 0 ] && USAGE && exit 0
ERROR(){
You can’t perform that action at this time.