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
Copyright 2020 Aubrey Taylor | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTH |
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
; create new file | |
; installation: | |
; 1. you must be running autohotkey: http://www.autohotkey.com | |
; 2. double click on script to run | |
; [pro-tip] add this script to your startup folder to run when windows start | |
; [pro-top] you can add this script to another .ahk script file. | |
; hotkey is set to control + alt + n | |
; more on hotkeys: http://www.autohotkey.com/docs/Hotkeys.htm |
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 fabric.api import env | |
env.use_ssh_config = True | |
env.forward_agent = True | |
env.roledefs = { | |
# key # hostname from config | |
'foo': ['foo.production'], | |
} |
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
export LDFLAGS="-L/usr/local/opt/sqlite/lib -L/usr/local/opt/zlib/lib" | |
export CPPFLAGS="-I/usr/local/opt/sqlite/include -I/usr/local/opt/zlib/include" | |
xcode-select --install | |
brew update | |
brew upgrade | |
brew install zlib | |
pyenv install 3.7.1 | |
pyenv global 3.7.1 |
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
<?php | |
/** | |
* Remove API Endpoints | |
* | |
* Clobber API routes to remove them from public access. | |
*/ | |
function remove_wp_json_api_endpoints($endpoints) { | |
$toRemove = array( | |
"/oembed/1.0/embed", | |
"/wp/v2/users", |
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
long_description = '' | |
try: | |
import subprocess | |
import pandoc | |
process = subprocess.Popen( | |
['which pandoc'], | |
shell=True, | |
stdout=subprocess.PIPE, |
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
require.config({ | |
baseUrl: '/js', | |
/* non-essential config removed for berevity */ | |
packages: [ | |
/* gsap package looks like: | |
vendor/ | |
gsap/ | |
non-amd/ |
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
<div class="focuspoint" | |
role="presentation" | |
data-focus-x-sm="-0.27" data-focus-y-sm="0.98" data-image-w-sm="992" data-image-h-sm="685" | |
data-focus-x-md="-0.29" data-focus-y-md="1.00" data-image-w-md="1102" data-image-h-md="809" | |
data-focus-x-lg="-0.05" data-focus-y-lg="1.00" data-image-w-lg="1600" data-image-h-lg="879" | |
> | |
<picture class="img-presentation"> | |
<source media="(min-width: 1200px)" srcset="http://cdn.com/path/to/marquee-lg.jpg"> | |
<source media="(min-width: 992px)" srcset="http://cdn.com/path/to/marquee-md.jpg"> |
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 django_extensions.management.commands.reset_db import Command as ResetDBCommand | |
class Command(ResetDBCommand): | |
requires_system_checks = False | |
help = "Override django-extensions reset_db and disable system_checks." | |
def handle(self, *args, **options): | |
self.stdout.write("Executing customized version of reset_db that disables system checks.") | |
super().handle(*args, **options) |
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
def formfield_for_foreignkey(self, db_field, request, **kwargs): | |
if db_field.name == "my_plugin_fk": | |
kwargs["queryset"] = models.MyPluginModel.objects.filter( | |
Q(placeholder__static_draft__isnull=False) | | |
Q(placeholder__page__publisher_is_draft=True) | |
) | |
return super().formfield_for_foreignkey(db_field, request, **kwargs) |
NewerOlder