Skip to content

Instantly share code, notes, and snippets.

View JT5D's full-sized avatar
💭
Multiversing...

JT5D JT5D

💭
Multiversing...
View GitHub Profile
#!/bin/bash
# Usage: chmown [options] <chmod-args> <chown-user>[:<chown-group>]
chmown () {
options=''
while [ -n "$(echo $1 | grep '-')" ]; do
options="$options $1"
shift
done
@JT5D
JT5D / export.py
Created November 8, 2013 14:19 — forked from sehmaschine/export.py
from tasks import full_export_task
def export_year_zip(user):
full_export_task.update_state(state="PROGRESS", meta={})
@JT5D
JT5D / base.py
Created November 8, 2013 14:19 — forked from sehmaschine/base.py
def _walk(self, path, filelisting):
"""
Recursively walks the path and collects all files and
directories.
Danger: Symbolic links can create cycles and this function
ends up in a regression.
"""
dirs, files = self.site.storage.listdir(path)
from filebrowser.sites import site
from django.core.files.storage import DefaultStorage, default_storage, FileSystemStorage
site_1 = site(name="First FB Site", app_name="filebrowser", storage=default_storage) # default filebrowser site
site_2 = site(name="Second FB Site", app_name="filebrowser", storage=FileSystemStorage)
/* Imports
------------------------------------------------------------------------------------------------------ */
@import "partials/base";
@import "blueprint";
@import "compass/typography/vertical_rhythm";
/* >1220px
------------------------------------------------------------------------------------------------------ */
if value != "":
try:
value = FileObject(url_to_path(value))
if value.is_version and VERSIONS_BASEDIR:
final_attrs['directory'] = os.path.split(value.original.path_relative)[0]
else:
final_attrs['directory'] = os.path.split(value.path_relative)[0]
except:
pass
@JT5D
JT5D / voicesms.rb
Created November 10, 2013 12:19 — forked from ttscoff/voicesms.rb
#!/usr/bin/env ruby -Ku
require 'net/http'
require 'net/https'
require 'open-uri'
require 'cgi'
require 'optparse'
ACCOUNT = 'googleaccount' # Set to Google Voice account email for default account
PASSWORD = 'googlepass' # Set to Google Voice account password for default account
# Updated 2013-10-31 to handle:
# listing all files with tags
# list only files without tags
# and deal with spaces in filenames (that part got ugly).
# Also, set the query variable to local
# List files with specified Finder tags in current directory and subdirectories
# Works with partial words starting from the beginning of the word
lst() {
$ defaults write com.pilotmoon.popclip UseShortTitles -bool YES
$ killall PopClip && open -a PopClip