I hereby claim:
- I am ajself on github.
- I am ajself (https://keybase.io/ajself) on keybase.
- I have a public key whose fingerprint is 9B46 EB7A D0FA 76D6 BE4F 4C85 82CA 684D 53E7 5E1F
To claim this, I am signing this object:
[ | |
{ | |
"id": "IMPRESSION_POST", | |
"url": "https://tps.doubleverify.com/visit.jpg?ctx=10562434&cmp=23852888&sid=6088994&plc=272648324&adsrv=1&btreg=&btadsrv=&crt=&tagtype=&dvtagver=6.1.img&", | |
"label": "" | |
}, | |
{ | |
"id": "IMPRESSION_POST", | |
"url": "https://ad.doubleclick.net/ddm/trackimp/N8031.163254IMGUR.COM/B23852888.272648324;dc_trk_aid=467310045;dc_trk_cid=131882115;ord=1589214351857;dc_lat=;dc_rdid=;tag_for_child_directed_treatment=;tfua=?", | |
"label": "" |
/* | |
This is an update to an example found on http://www.jairobjunior.com/blog/2016/03/05/how-to-rotate-only-one-view-controller-to-landscape-in-ios-slash-swift/ | |
The code there works, with some updating to the latest Swift, but the pattern isn't very Swifty. The following is what I found to be more helpful. | |
*/ | |
/* | |
First, create a protocol that UIViewController's can conform to. | |
This is in opposition to using `Selector()` and checking for the presence of an empty function. | |
*/ |
# Update build number with number of git commits | |
# adapted from http://blog.curtisherbert.com/automated-build-numbers/ | |
buildNumber=$(git rev-list HEAD --count) | |
echo "Updating build number to $buildNumber" | |
dsym_plist="${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Info.plist" | |
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}" | |
if [ -f "$DSYM_INFO_PLIST" ] ; then | |
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "$dsymPlist" | |
fi |
// I was getting bad results for collectionView.indexPathForItem(at: location) | |
// Ends up the scroll view content offset needs to be taken into consideration. | |
func previewingContext(_ previewingContext: UIViewControllerPreviewing, viewControllerForLocation location: CGPoint) -> UIViewController? { | |
guard let collectionView = collectionView else { return nil } | |
// The magic sauce | |
let cellLocation = CGPoint(x: location.x + collectionView.contentOffset.x, | |
y: location.y + collectionView.contentOffset.y) |
/* | |
<javascriptresource> | |
<name>Save as SVG</name> | |
<about>Name a layer or layerset with .svg to convert it.</about> | |
</javascriptresource> | |
*/ | |
var SvgWiz = SvgWiz || { | |
settings : { | |
scriptName : 'svgexport', |
I hereby claim:
To claim this, I am signing this object:
# http://www.piware.de/2011/01/creating-an-https-server-in-python/ | |
# openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes | |
import BaseHTTPServer, SimpleHTTPServer | |
import ssl | |
httpd = BaseHTTPServer.HTTPServer(('localhost', 4443), SimpleHTTPServer.SimpleHTTPRequestHandler) | |
httpd.socket = ssl.wrap_socket (httpd.socket, certfile='path/to/localhost.pem', server_side=True) | |
httpd.serve_forever() |
randomHSLAColor = -> | |
getRandomInRange = (min, max) -> | |
return Math.floor(Math.random() * (max - min + 1)) + min | |
"hsla(#{getRandomInRange(0, 360)}, #{getRandomInRange(70, 100)}%, #{getRandomInRange(45, 55)}%, 0.6)" |
[ | |
{ "keys": ["super+shift+d"], "command": "toggle_side_bar" }, | |
{ "keys": ["super+r"], "command": "refresh_folder_list"}, | |
{ "keys": ["ctrl+shift+t"], "command": "delete_trailing_spaces" }, | |
// Origami | |
{ "keys": ["super+k", "k"], "command": "travel_to_pane", "args": {"direction": "up"} }, | |
{ "keys": ["super+k", "l"], "command": "travel_to_pane", "args": {"direction": "right"} }, | |
{ "keys": ["super+k", "j"], "command": "travel_to_pane", "args": {"direction": "down"} }, | |
{ "keys": ["super+k", "h"], "command": "travel_to_pane", "args": {"direction": "left"} }, |
# --DEMO CODE-- | |
# Mimics the carousel sliding behavior found when clicking text links | |
# in a Google Drive Document that have comments | |
# <a href="#" class="screen" data-screen="1">Click!</a> | |
$(document).on 'click', '.screen', (evt) -> | |
evt.preventDefault() | |
console.log evt | |
screen = $(this).data 'screen' |