Skip to content

Instantly share code, notes, and snippets.

View gxbsst's full-sized avatar

Weston gxbsst

  • Our Happy Life
  • Shanghai, China
  • 20:57 (UTC -12:00)
View GitHub Profile
// setting 2025
ide.win.frame.decoration=false
project.tree.structure.show.url=false
editor.zero.latency.typing=true
ide.new.editor.tabs.vertical.borders=false
@gxbsst
gxbsst / .yarnrc
Created November 14, 2020 12:36 — forked from songouyang/.yarnrc
yarn 使用淘宝国内镜像
sass_binary_site "https://npm.taobao.org/mirrors/node-sass/"
phantomjs_cdnurl "https://npm.taobao.org/mirrors/phantomjs/"
electron_mirror "https://npm.taobao.org/mirrors/electron/"
registry "https://registry.npm.taobao.org"
@gxbsst
gxbsst / dabblet.css
Created February 22, 2020 03:54
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
@gxbsst
gxbsst / dabblet.css
Last active February 22, 2020 01:22
Translucent borders
/**
* Translucent borders
*/
body {
background: url('http://csssecrets.io/images/stone-art.jpg');
}
div {
border: 10px solid hsla(0,0%,100%,.5);
class Counter extends Object {
static createZero() {
return new Counter(0);
}
value: number;
constructor(value: number) {
super();
this.value = value;
}
increment() {
Date.prototype[Symbol.toPrimitive] = function (
hint: 'default' | 'string' | 'number') {
let O = this;
if (TypeOf(O) !== 'object') {
throw new TypeError();
}
let tryFirst;
if (hint === 'string' || hint === 'default') {
tryFirst = 'string';
} else if (hint === 'number') {
@gxbsst
gxbsst / 1
Created February 20, 2020 01:19
// Copyright 2004-present Facebook. All Rights Reserved.
jest.mock('jquery');
beforeEach(() => jest.resetModules());
it('calls into $.ajax with the correct params', () => {
const $ = require('jquery');
const fetchCurrentUser = require('../fetchCurrentUser');
@gxbsst
gxbsst / css_resources.md
Created February 19, 2020 14:00 — forked from jookyboi/css_resources.md
CSS libraries and guides to bring some order to the chaos.

Libraries

  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
  • Compass - Open source CSS Authoring Framework.
  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.

Guides

@gxbsst
gxbsst / rails_resources.md
Created February 19, 2020 13:59 — forked from jookyboi/rails_resources.md
Rails-related Gems and guides to accelerate your web project.

Gems

  • Bundler - Bundler maintains a consistent environment for ruby applications. It tracks an application's code and the rubygems it needs to run, so that an application will always have the exact gems (and versions) that it needs to run.
  • rabl - General ruby templating with json, bson, xml, plist and msgpack support
  • Thin - Very fast and lightweight Ruby web server
  • Unicorn - Unicorn is an HTTP server for Rack applications designed to only serve fast clients on low-latency, high-bandwidth connections and take advantage of features in Unix/Unix-like kernels.
  • SimpleCov - SimpleCov is a code coverage analysis tool for Ruby 1.9.
  • Zeus - Zeus preloads your Rails app so that your normal development tasks such as console, server, generate, and specs/tests take less than one second.
  • [factory_girl](h