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
| #!/bin/bash | |
| # Usage: chmown [options] <chmod-args> <chown-user>[:<chown-group>] | |
| chmown () { | |
| options='' | |
| while [ -n "$(echo $1 | grep '-')" ]; do | |
| options="$options $1" | |
| shift | |
| done |
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 tasks import full_export_task | |
| def export_year_zip(user): | |
| full_export_task.update_state(state="PROGRESS", meta={}) |
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
| 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) |
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 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) |
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
| /* Imports | |
| ------------------------------------------------------------------------------------------------------ */ | |
| @import "partials/base"; | |
| @import "blueprint"; | |
| @import "compass/typography/vertical_rhythm"; | |
| /* >1220px | |
| ------------------------------------------------------------------------------------------------------ */ |
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
| 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 |
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
| javascript:(function(){var p=document.createElement("p");p.innerHTML="<strong>Loading…</strong>";p.id="loadingp";p.style.padding="20px";p.style.background="#fff";p.style.left="20px";p.style.top=0;p.style.position="fixed";p.style.zIndex="9999999";p.style.opacity=".85";document.body.appendChild(p);document.body.appendChild(document.createElement("script")).src="https://gist.github.com/ttscoff/5834741/raw/grablinks.js?x="+(Math.random());})(); |
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
| #!/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 |
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
| $ defaults write com.pilotmoon.popclip UseShortTitles -bool YES | |
| $ killall PopClip && open -a PopClip |