curl -sL https://gist.github.com/denji/9731967/raw/jetbrains-uninstall.sh | bash -s
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
# BEGIN WordPress | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase /html/ | |
RewriteRule ^index\.php$ - [L] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule . /html/index.php [L] | |
</IfModule> |
HomebrewでphpMyAdminを入れる方法
※OS Xの中のApacheとPHPを動かして、MySQLをHomebrewで入れてる前提
それがまだなら、まずは以下を
Apache+PHP+MySQL(Homebrew) on Mountain Lion https://gist.github.com/3806975
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
% PART A | |
%linking camera with rasperry pi | |
%creating a camera board object | |
clear rpi; | |
rpi= raspi(); | |
cam = cameraboard(rpi,'Resolution','640x480'); | |
%PART B | |
% code to start the camera and to capture image | |
Clear all | |
Close all |
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
# Expanding Exp | |
# This is very, very difficult. | |
grammar = [ | |
("exp", ["exp", "+", "exp"]), | |
("exp", ["exp", "-", "exp"]), | |
("exp", ["(", "exp", ")"]), | |
("exp", ["num"]), | |
] |
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 json | |
import urllib | |
import pymongo | |
con = pymongo.Connection('mongodb://localhost', | |
safe = True) | |
db = con.reddit | |
stories = db.stories | |
url = 'http://www.reddit.com/r/Python/.json' |
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
#!/usr/bin/env python | |
# big_tweet_import | |
# Imports the tweet-dump into MongoDB | |
# | |
# Author: Benjamin Bengfort <benjamin@bengfort.com> | |
# Created: Thu Aug 28 07:37:41 2014 -0400 | |
# | |
# Copyright (C) 2014 Bengfort.com | |
# For license information, see LICENSE.txt | |
# |
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
#!/usr/bin/env python | |
from urllib2 import urlopen, urlencode | |
from pymongo import connection | |
import json | |
from optparse import OptionParser | |
from time import sleep | |
verbose = 1 | |
parser = OptionParser() |
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 sys | |
import six | |
from django.template.backends.jinja2 import Jinja2, Template | |
from django.template.backends.utils import csrf_token_lazy, csrf_input_lazy | |
from django.template.exceptions import TemplateDoesNotExist | |
from jinja2.exceptions import TemplateSyntaxError | |
from jinja2.utils import import_string | |
import jinja2 |
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
#!/usr/bin/python | |
import argparse | |
from pymongo import MongoClient as Client | |
from bson import BSON | |
from bson import json_util | |
import json | |
import os | |
# mongo client |
OlderNewer