This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
function Lace(selector) { | |
var nodes, el; | |
// Handle situation where called without "new" keyword | |
if (false === (this instanceof Lace)) { | |
return new Lace(selector); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mixin quantity-query($selector, $type, $amount, $max: null) { | |
@if $type == at-least { | |
#{$selector}:nth-last-child(n+#{$amount}), | |
#{$selector}:nth-last-child(n+#{$amount}) ~ #{$selector} { @content; } | |
} @else if $type == at-most { | |
#{$selector}:nth-last-child(-n+#{$amount}):first-child, | |
#{$selector}:nth-last-child(-n+#{$amount}):first-child ~ #{$selector} { @content; } | |
} @else if $type == between { | |
@if type-of($max) != "number" { | |
@error "Max value must be a number for quantity-query."; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
// Usage: | |
// Go to `Sublime Text > Browse Packages` | |
// Place the file under `User` directory | |
// Enable the `react` in `sb-setting.sublime-settings` (refer <https://github.com/Pleasurazy/Sublime-Better-Completion/>) | |
{ | |
"scope": "source.js", | |
"completions": | |
[ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Usage: | |
// Go to `Sublime Text > Browse Packages` | |
// Place the file under `User` directory | |
{ | |
"scope": "source.js", | |
"completions": | |
[ | |
// Top-level API |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Usage: | |
// Go to `Sublime Text > Browse Packages` | |
// Place the file under `User` directory | |
// Enable the `react-es5` in `sb-setting.sublime-settings` (refer <https://github.com/Pleasurazy/Sublime-Better-Completion/>) | |
{ | |
"scope": "source.js", | |
"completions": | |
[ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Your init script | |
# | |
# Atom will evaluate this file each time a new window is opened. It is run | |
# after packages are loaded/activated and after the previous editor state | |
# has been restored. | |
# | |
# An example hack to log to the console when each text editor is saved. | |
# | |
# atom.workspace.observeTextEditors (editor) -> | |
# editor.onDidSave -> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
RELEASE="$1" | |
JAVA_VERSION="1.8" | |
RED="\033[0;31m" | |
GREEN="\033[0;32m" | |
BLUE="\033[0;34m" | |
ENDCOLOR="\033[0m" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Codemod to convert class methods to properties, and remove `.bind(this)` in JSX props. | |
// Doesn't support Flow annotations yet | |
export default function(file, api) { | |
const j = api.jscodeshift; | |
const convertToClassProps = p => { | |
const node = p.node; | |
if (node.key.name.indexOf('_') === 0) { | |
node.type = 'ClassProperty'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* @flow */ | |
/* eslint-disable no-console */ | |
let _types: ?Array<string>, | |
_filters: ?Array<string | RegExp>, | |
_history: ?Array<{ timestamp: number; args: Array<any>; }>; | |
const labels = { | |
info: '[info]', | |
warn: '[warn]', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MainActivity extends ReactActivity { | |
/** | |
* Returns the name of the main component registered from JavaScript. | |
* This is used to schedule rendering of the component. | |
*/ | |
@Override | |
protected String getMainComponentName() { | |
return "MyApp"; | |
} |
OlderNewer