Skip to content

Instantly share code, notes, and snippets.

View zerob13's full-sized avatar
🐢
.

Lingfeng Yang zerob13

🐢
.
View GitHub Profile
@zerob13
zerob13 / .prettierrc
Last active November 14, 2019 02:45
my simple prettier config file
{
"singleQuote": true,
"semi": false,
"jsxSingleQuote": true,
"printWidth": 85,
"tabWidth": 2
}
{"sig":"cb769697b6f51ac77b0bd96071d45df8598b4224cbeb384bb401090ea77dd8cbb5e12538fd2be8e24d2c16d49f4bcf013194dea19183541b0613a9305c9acd771","msghash":"5d9e725f38ba79dacd6ce7fb5c245775ed9941854f2f963496778be8922a2592"}
@zerob13
zerob13 / vscode.json
Last active August 14, 2018 11:19
My Visual Studio Code configure
{
"workbench.colorTheme": "Atom One Dark",
"editor.tabSize": 2,
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/CVS": true,
"**/.DS_Store": true
},

Keybase proof

I hereby claim:

  • I am zerob13 on github.
  • I am zerob13 (https://keybase.io/zerob13) on keybase.
  • I have a public key whose fingerprint is 69D5 1AFF 6461 D1FD 3163 79A8 A444 8185 E8C6 B983

To claim this, I am signing this object:

@zerob13
zerob13 / grid.scss
Created August 9, 2016 03:19
1200px grid system scss
.container_15 {
width: 1200px;
margin-left: auto;
margin-right: auto
}
@for $i from 1 through 15{
.grid_#{$i} {
position: relative;
display: inline;
float: left;
@zerob13
zerob13 / README.md
Created May 10, 2016 02:37 — forked from netgusto/README.md
Run a graphical app in docker on OSX

Run a graphical app in docker on OSX

Note: Replace 192.168.0.5 below by your own interface ip

mac $ socat TCP-LISTEN:6000,reuseaddr,fork UNIX-CLIENT:\"$DISPLAY\"
mac $ docker run --device=/dev/tty0 -e DISPLAY=192.168.0.5:0 -i -t ubuntu /bin/bash
ubuntu $ apt-get update && apt-get install -y firefox
ubuntu $ firefox
@zerob13
zerob13 / paginated_collection.js
Last active August 29, 2015 14:26 — forked from io41/paginated_collection.js
Pagination with Backbone.js
// includes bindings for fetching/fetched
var PaginatedCollection = Backbone.Collection.extend({
initialize: function() {
_.bindAll(this, 'parse', 'url', 'pageInfo', 'nextPage', 'previousPage');
typeof(options) != 'undefined' || (options = {});
this.page = 1;
typeof(this.perPage) != 'undefined' || (this.perPage = 10);
},
fetch: function(options) {
@zerob13
zerob13 / power.js
Created August 7, 2014 13:45
the powering ladder
function myPower(x, n) {
var y = 1;
while (1) {
t = n % 2;
n = Math.floor(n / 2);
if (t == 1) {
y = y * x;
}
if (n == 0) {
break;
package com.cyrilmottier.android.resourcesadditions;
import android.content.res.Resources;
import android.content.res.XmlResourceParser;
import android.os.Bundle;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
/**
* @author Cyril Mottier