Three or more hashtags.
#[^#]+#[^#]+#
Long hashtags (15+ characters): #hashtagpunchline
| // Tracking cursor position in real-time without JavaScript | |
| // Demo: https://twitter.com/davywtf/status/1124146339259002881 | |
| package main | |
| import ( | |
| "fmt" | |
| "net/http" | |
| "strings" | |
| ) |
| var ref = require('ref'); | |
| module.exports = BufferType; | |
| /** | |
| * Fixed length "Buffer" type, for use in Struct type definitions. | |
| * | |
| * Optionally setting the `encoding` param will force to call | |
| * `toString(encoding)` on the buffer returning a String instead. | |
| */ |
| sips -s format png /Applications/Safari.app/Contents/Resources/compass.icns --out /Users/Johan/Desktop/safari.png |
| As of iOS 11/macOS High Sierra, and only including ones in Foundation and CoreFoundation | |
| Strings: | |
| _NSCFString - a CFStringRef or CFMutableStringRef. This is the most common type of string object currently. | |
| - May have 8 bit (ASCII) or 16 bit (UTF-16) backing store | |
| _NSCFConstantString - a compile time constant CFStringRef, like you'd get with @"foo" | |
| - May also be generated by dynamic string creation if matches a string in a pre-baked table of common strings called the StringROM | |
| NSBigMutableString - an NSString backed by a CFStorage (https://github.com/opensource-apple/CF/blob/master/CFStorage.h) for faster handling of very large strings | |
| NSCheapMutableString - a very limited NSMutableString that allows for zero-copy initialization. Used in NSFileManager for temporarily wrapping stack buffers. |
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
| #!/usr/bin/env bash | |
| # Install Xcode Command Line Tools. | |
| xcode-select --install | |
| # Install Homebrew. | |
| /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
| # Install brew basics (auto-updating). | |
| brew install terminal-notifier |
When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:
var Article = require('../../../models/article');Those suck for maintenance and they're ugly.
| void callEntryPointOfImage(char *path, int argc, char **argv) | |
| { | |
| void *handle; | |
| int (*binary_main)(int binary_argc, char **binary_argv); | |
| char *error; | |
| int err = 0; | |
| printf("Loading %s…\n", path); | |
| handle = dlopen (path, RTLD_LAZY); |