Skip to content

Instantly share code, notes, and snippets.

🐢
.

Lingfeng Yang zerob13

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

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 Aug 9, 2016
1200px grid system scss
View grid.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 — forked from netgusto/README.md
Run a graphical app in docker on OSX
View README.md

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 Aug 29, 2015 — forked from io41/paginated_collection.js
Pagination with Backbone.js
View paginated_collection.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 Aug 7, 2014
the powering ladder
View power.js
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;
View ResourcesAdditions.java
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
View FloatLabelLayout.java
/*
* Copyright (C) 2014 Chris Banes
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
You can’t perform that action at this time.