| ⌘T | go to file |
| ⌘⌃P | go to project |
| ⌘R | go to methods |
| ⌃G | go to line |
| ⌘KB | toggle side bar |
| ⌘⇧P | command prompt |
This file contains hidden or 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 box-shadow($top, $left, $blur, $color, $inset: false) { | |
| @if $inset { | |
| -webkit-box-shadow:inset $top $left $blur $color; | |
| -moz-box-shadow:inset $top $left $blur $color; | |
| box-shadow:inset $top $left $blur $color; | |
| } @else { | |
| -webkit-box-shadow: $top $left $blur $color; | |
| -moz-box-shadow: $top $left $blur $color; | |
| box-shadow: $top $left $blur $color; | |
| } |
This file contains hidden or 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
| <?php | |
| add_filter( 'the_content', 'remove_empty_p', 20, 1 ); | |
| function remove_empty_p( $content ){ | |
| // clean up p tags around block elements | |
| $content = preg_replace( array( | |
| '#<p>\s*<(div|aside|section|article|header|footer)#', | |
| '#</(div|aside|section|article|header|footer)>\s*</p>#', | |
| '#</(div|aside|section|article|header|footer)>\s*<br ?/?>#', | |
| '#<(div|aside|section|article|header|footer)(.*?)>\s*</p>#', | |
| '#<p>\s*</(div|aside|section|article|header|footer)#', |
#Techniques for Anti-Aliasing @font-face on Windows
It all started with an email from a client: Do these fonts look funky to you? The title is prickly.
The font in question was Port Lligat Sans from Google Web Fonts.
This file contains hidden or 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
| import requests | |
| from io import open as iopen | |
| from urlparse import urlsplit | |
| def requests_image(file_url): | |
| suffix_list = ['jpg', 'gif', 'png', 'tif', 'svg',] | |
| file_name = urlsplit(file_url)[2].split('/')[-1] | |
| file_suffix = file_name.split('.')[1] | |
| i = requests.get(file_url) | |
| if file_suffix in suffix_list and i.status_code == requests.codes.ok: |
This file contains hidden or 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 __future__ import unicode_literals | |
| from urlparse import parse_qs | |
| import requests | |
| from requests_oauthlib import OAuth1 | |
| key = "key" | |
| secret ="secret" | |
| oauth = OAuth1(key, secret) |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
This file contains hidden or 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
| /* Modern Font Stacks */ | |
| /* System (2026 update) */ | |
| font-family: -apple-system, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; | |
| /* System-Only Minimal 2026 */ | |
| font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; | |
| /* System Max Consistency on Modern OS 2026 */ | |
| font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif; |
This file contains hidden or 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
| <?php | |
| require_once("/path/to/vendor/mixpanel/mixpanel-php/lib/Mixpanel.php"); // import the Mixpanel class | |
| // get the Mixpanel singelton (will be created if it doesn't exist) | |
| $mp = Mixpanel::getInstance("MIXPANEL_PROJECT_TOKEN"); | |
| // this would likely come from a database or session variable | |
| $user_id = 12345; |
OlderNewer

