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
→ curl -iI -v -A " " "http://www.la-grange.net/" | |
* About to connect() to www.la-grange.net port 80 (#0) | |
* Trying 128.30.54.58... connected | |
* Connected to www.la-grange.net (128.30.54.58) port 80 (#0) | |
> HEAD / HTTP/1.1 | |
> User-Agent: | |
> Host: www.la-grange.net | |
> Accept: */* | |
> | |
< HTTP/1.1 200 OK |
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
// The trick is to link the DeviceSupport folder from the beta to the stable version. | |
// Updated on Jan 24th, 2017 for Xcode 8.3b1 | |
ln -s /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/10.3\ \(14E5230d\)/ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport | |
// Then restart Xcode and reconnect your devices. You will need to do that for every beta of future iOS versions | |
// sudo needed if you run the Mac App Store version. Always download the dmg instead... you'll thank me later :) |
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
/* disable font boosting on mobile browsers */ | |
body * { | |
max-height: 1000000em; /* Chrome for Android */ | |
-moz-text-size-adjust: none; /* Firefox Mobile */ | |
-webkit-text-size-adjust: 100%; /* Safari */ | |
} |
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
// From https://github.com/facebookarchive/AsyncDisplayKit/issues/616#issuecomment-133422166 | |
- (void)reloadData | |
{ | |
UIView *snapshot = [_tableView snapshotViewAfterScreenUpdates:NO]; | |
[self.view insertSubview:snapshot aboveSubview:_tableView]; | |
[_tableView beginUpdates]; | |
[_tableView reloadData]; | |
[_tableView endUpdatesAnimated:NO completion:^(BOOL completed) { |
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
@interface NSObject (Debounce) | |
- (void)debounce:(SEL)action delay:(NSTimeInterval)delay; | |
@end |
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
var l = getEventListeners(document).copy[0]; | |
document.removeEventListener('copy', l.listener, l.useCapture); | |
// change format so that codes inside `PRE` tag can show correctly in notion | |
for (let strong of [...document.getElementsByTagName('code')].filter(i => i.parentNode.tagName === 'PRE')) { | |
const textNode = document.createElement('span'); | |
textNode.innerHTML = strong.innerHTML; | |
strong.parentNode.replaceChild(textNode, strong); | |
} | |
for (let strong of [...document.getElementsByTagName('strong')].filter(i => i.parentNode.tagName === 'PRE')) { | |
const textNode = document.createElement('span'); |
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 | |
# usage: get [ RESOLUTION [ YEAR [ IDS... ] ] ] | |
resolution=${1:-SD} | |
year=${2:-2015} | |
shift | |
shift | |
ids=$* | |
RESOLUTION=$(echo $resolution | tr '[:lower:]' '[:upper:]') |
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
git clean -xfd | |
git submodule foreach --recursive git clean -xfd | |
git reset --hard | |
git submodule foreach --recursive git reset --hard | |
git submodule update --init --recursive |
OlderNewer