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 | |
fswatch -r "$1" -0 | while read -d "" file | |
do | |
rsync -a "$1" "$2" | |
echo "$file synced" | |
done |
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
# This is an auto-generated Django model module. | |
# You'll have to do the following manually to clean this up: | |
# * Rearrange models' order | |
# * Make sure each model has one field with primary_key=True | |
# * Make sure each ForeignKey has `on_delete` set to the desired behavior. | |
# * Remove `managed = False` lines if you wish to allow Django to create, modify, and delete the table | |
# Feel free to rename the models, but don't rename db_table values or field names. | |
from __future__ import unicode_literals | |
from django.db import models |
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
{ | |
"title": "the title", | |
"description": "the description", | |
"images": ["data:image/jpeg;base64,...", "data:image/png;base64,..."], | |
"price": 100 | |
} |
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.http import HttpResponse | |
class ApiResource: | |
@classmethod | |
def dispatch(cls, request, *args, **kwargs): | |
if args or 'object_id' in kwargs: | |
if request.method == 'GET': | |
return cls.read(request, *args, **kwargs) | |
elif request.method == 'PUT': |
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
execute pathogen#infect() | |
if has('gui_running') | |
let s:uname = system("uname -s") | |
if s:uname == "Darwin\n" | |
set guifont=consolas:h15 | |
let g:latex_view_general_viewer = '/Applications/Skim.app/Contents/MacOS/Skim' | |
else | |
set guifont=Consolas\ 13 | |
endif |
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 re | |
from django.http import HttpResponse | |
from django.shortcuts import render | |
from functools import wraps | |
uncamel_patterns = ( | |
re.compile('(.)([A-Z][a-z]+)'), | |
re.compile('([a-z0-9])([A-Z])'), | |
) |
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
var assets = require('./assets.json') | |
, path = require('path') | |
var baseDir = __dirname | |
var Component = function(opts) { | |
var self = this | |
self.name = opts.name | |
self.src = path.join(baseDir, opts.src) |
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
#include <iostream> | |
#include <string> | |
#include <libgen.h> | |
#include <Magick++.h> | |
using namespace std; | |
using namespace Magick; | |
string out( string fn, string sz ) { |
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
#coding=utf-8 | |
__test__ = { | |
"api_v1": """ | |
Upp! API version 1 | |
================== | |
Testing the functionality of Upp! API | |
>>> from django.utils import simplejson as json | |
>>> from django.test.client import Client |
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
#coding=utf-8 | |
__test__ = { | |
"api_v1": """ | |
Upp! API version 1 | |
================== | |
Testing the functionality of Upp! API | |
>>> from django.utils import simplejson as json | |
>>> from django.test.client import Client |
NewerOlder