Shell
#!/usr/bin/env sh
Python
#!/bin/bash | |
# Minify all jpg and png images in current directory recursively | |
command_exists () { | |
type "$1" &> /dev/null ; | |
} | |
# Learn more about optipng at http://sweetme.at/2013/09/11/how-to-maximize-png-image-compression-with-optipng/ | |
if command_exists optipng ; then | |
optipng -o2 -strip all **/*.png | |
else |
https://www.pivotaltracker.com/help/api?version=v3#github_hooks | |
https://www.pivotaltracker.com/help/api?version=v3#scm_post_commit_message_syntax | |
SCM Post-Commit Message Syntax | |
To associate an SCM commit with a specific Tracker story, you must include a special syntax in the commit message to indicate one or more story IDs and (optionally) a state change for the story. Your commit message should have square brackets containing a hash mark followed by the story ID. If a story was not already started (it was in the "not started" state), a commit message will automatically start it. For example, if Scotty uses the following message when committing SCM revision 54321: | |
[#12345677 #12345678] Diverting power from warp drive to torpedoes. | |
import { Dispatch } from 'redux'; | |
type StoreState = any; // preferable this should be the real Type of the store | |
/** Default action with just the type */ | |
interface Action<T extends string> { | |
readonly type: T; | |
} | |
/** Action extended with a payload that could be any value, used for the reducer */ |
pragma solidity ^0.7.0; | |
library bytesSwap { | |
string public test_string = "hello"; | |
function bytes32ToString(bytes32 _bytes32) public pure returns (string memory) { | |
uint8 i = 0; | |
while(i < 32 && _bytes32[i] != 0) { | |
i++; | |
} |
{ | |
"added_words": | |
[ | |
"Mockup", | |
"plugins", | |
"coffeescript", | |
"sourcemaps", | |
"html", | |
"plugin", | |
"init", |
[12:03 AM] acemarke: "controlled" and "uncontrolled" inputs
[12:04 AM] acemarke: if I have a plain, normal HTML page, and I put <input id="myTextbox" type="text" />
in my page(edited)
[12:04 AM] acemarke: and I start typing into that textbox
[12:04 AM] acemarke: it remembers what I've typed. The browser stores the current value for that input
[12:05 AM] acemarke: and then sometime later, I can get the actual element, say, const input = document.getElementById("myTextbox")
, and I can ask it for its value: const currentText = input.value;
[12:05 AM] acemarke: good so far?
[12:08 AM] acemarke: I'll keep going, and let me know if you have questions
[12:08 AM] lozio: ok, actually I'm reading
[12:09 AM] lozio: good
[12:09 AM] acemarke: so, a normal HTML input field effectively stores its own value at all times, and you can get the element and ask for its value
// Optional declares a type of keyed type T where all keys are optional. | |
// This allows | |
type Optional<T> = { [P in keyof T]? :T[P] } | |
interface Foo { | |
x :number | |
y :number | |
} | |
type OptionalFoo = Optional<Foo> |
{ | |
"parser": "babel-eslint", | |
"plugins": [ | |
"react", | |
"react-native" | |
], | |
"parserOptions": { | |
"ecmaFeatures": { | |
"jsx": true, | |
"modules": true |