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
# EditorConfig is awesome: http://EditorConfig.org | |
root = true | |
[*] | |
end_of_line = lf | |
insert_final_newline = true | |
trim_trailing_whitespace = true | |
indent_style = space | |
indent_size = 2 |
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
//#target photoshop | |
app.bringToFront(); | |
activeDocument.suspendHistory('Raster SOs', 'main()'); | |
function main() { | |
if(!documents.length) return; | |
selectAllLayers(); | |
var selectedLayers = getSelectedLayersIdx(); |
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
// Get the bounding boxes and delta | |
var beforeFormBounds = beforeForm.getBoundingClientRect(); | |
var formBounds = form.getBoundingClientRect(); | |
var formDelta = formBounds.top - beforeFormBounds.top; | |
var beforeFormDelta = beforeFormBounds.top - formBounds.top; | |
// Move the dom node | |
this.insertBefore(form, beforeForm); | |
this._reIndexForms(); | |
this.updateOrdering(); |
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 | |
case "$1" in | |
'start') echo "Starting SSH tunnel ..." | |
ssh -fTN git@bitbucket.org | |
;; | |
'check') echo "Checking if tunnel is active ..." | |
ssh -O check git@bitbucket.org | |
;; |
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
$color-grey-slight: #fafafa; | |
$color-grey-light: #e5e5e5; | |
$color-grey-medlight: #e1e1e1; | |
$color-grey-medlight2: #bdbdbd; | |
$color-grey-medium: #898989; | |
$color-grey-dark: #393939; | |
$color-grey-dark2: #444444; | |
$color-grey-vdark: #2e2e2e; | |
$color-green-dark: #638d28; |
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
--color-base1: #010714; | |
--color-base2: #fafafa; | |
--color-primary1: #D36000; | |
--color-primary2: #FF7E13; | |
--color-Primary3: #FF7400; | |
--color-primary4: #AA4D00; | |
--color-primary5: #7C3800; | |
--color-secondary1: #D38D00; |
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 long, slightly incorrect method... | |
def looper(count, depth, *args): | |
""" | |
No this does not allow you to go back in time | |
@param count: number of iterations per loop | |
@param depth: number of loops | |
""" | |
for i in range(count): | |
if depth > 0: |
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 get_template_names(self, **kwargs): | |
if self.template_name: | |
return self.template_name | |
return self.page.get_template() |
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
import os | |
import base64 | |
from subprocess import call | |
from django import http | |
from django.conf import settings | |
from django_seo_js.backends import SEOBackendBase | |
SITE_CONF = getattr(settings, 'SITE_CONF') |
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 format_date_for_sforce(timestamp): | |
""" | |
Returns a datetime formatted as 2012-02-15T19:03:32-0800 | |
""" | |
if not timestamp: | |
return timestamp | |
total_seconds = timestamp.utcoffset().total_seconds() | |
minutes, seconds = divmod(total_seconds, 60) | |
hours, minutes = divmod(minutes, 60) |
NewerOlder