View showHideFormFields.js
// this is the function being called whenever a page gets loaded, including when you scroll to get the next page
// you need to configure your view in to specify that you want this function to be called
// this function is in, but for some pages that are not loaded often (staff pages, settings) or are
// big enough you can have a file just for this page like `settings.js` (for what you're trying to do main.js is enough)
function loadCardInList() {
// Show/hide include_cameos when member_id is set
// $(xxx) is a way to retrieve an HTML element currently on the page
// "#sidebar-wrapper #id_member_id" is the selector to find the elements. it's very similar to CSS selectors.
# Original calendar thingy
def availability_calendar(self):
calendar = [['', 'M', 'T', 'W', 'T', 'F', 'S', 'S']] + [
[self._I_TO_AVAILABILITY[i] if j == 0 else 'no' for j in range(8)]
for i in range(len(self.AVAILABILITY_CHOICES))
for a, v in self.availability.items():
if v:
cat votes.txt | sort | uniq -c | sort -r
View react.el
(add-to-list 'load-path "~/.emacs.d/installed/")
(when (fboundp 'electric-indent-mode) (electric-indent-mode -1))
(require 'web-mode)
(add-to-list 'auto-mode-alist '("\\.phtml\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.tpl\\.php\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.[agj]sp\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.as[cp]x\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.erb\\'" . web-mode))
for img in `ls *-large`; do newimg=`echo $img | rev | cut -d'-' -f2- | rev`; echo $newimg; mv $img $newimg; done

Perfect Lock


For every N notes, there is a N% chance of turning all goods and greats in the next N seconds into perfects. (Level 1)


Every N seconds, there is a N% chance of turning all goods and greats in the next N seconds into perfects. (Level 1)

cd ~/Documents/python/MagiCircles/ &&\
source env/bin/activate &&\
rm -f web/locale/ja/LC_MESSAGES/django.po &&\
python makemessages -l ja --ignore=env/* --ignore=./ --ignore=sample_project/sample_project/ --ignore=web/templates/password/* --ignore=web/ &&\
deactivate &&\
cd ~/Documents/python/StardustRun/ &&\
source env/bin/activate &&\
rm -f stardustrun/locale/ja/LC_MESSAGES/django.po &&\
python makemessages -l ja --ignore=env/* --ignore=stardustrun_project/ &&\
from __future__ import division
import tinify, cStringIO, os
from PIL import Image
from django.conf import settings as django_settings
from django.core.files.temp import NamedTemporaryFile
from django.core.files.images import ImageFile
def shrinkImageFromData(data, filename):
_, extension = os.path.splitext(filename)
extension = extension.lower()
convert "$1" -flop tmp
convert "$1" tmp +append tmp
convert "$1" -flop tmp.png
convert "$1" tmp.png +append tmp.png
convert tmp.png -flip "$1"
convert tmp.png "$1" -append "$1"
rm tmp.png
View MagiCirclesExamples.js
function updateCards() {
$('.card').click(function(e) {
return false;