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 os | |
import logging | |
import httplib2 | |
from apiclient.discovery import build | |
from django.contrib.auth.decorators import login_required | |
from django.core.urlresolvers import reverse | |
from django.http import HttpResponse | |
from django.http import HttpResponseBadRequest | |
from django.http import HttpResponseRedirect |
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
[ec2-user@ip-10-65-176-236 datomic-free-0.9.5067]$ bin/groovysh | |
Nov 22, 2014 1:45:44 AM java.util.prefs.FileSystemPreferences$2 run | |
INFO: Created user preferences directory. | |
Groovy Shell (1.8.9, JVM: 1.6.0_33) | |
Type 'help' or '\h' for help. | |
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | |
groovy:000> import datomic.Peer | |
import datomic.Peer | |
===> [import datomic.Peer] | |
groovy:000> uri = "datomic:mem://hello" |
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
package db | |
import scala.language.reflectiveCalls | |
import datomisca._ | |
import scala.concurrent._ | |
import scala.concurrent.duration.Duration | |
import java.util.{Date => JDate} | |
import datomisca.executioncontext.ExecutionContextHelper._ | |
class DatomicClient { |
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
git rm --cached *.xml | |
git rm --cached vcs.xml | |
git rm --cached modules.xml | |
git rm --cached misc.xml | |
git rm --cached encodings.xml.xml | |
git rm --cached encodings.xml | |
git rm --cached deployment.xml | |
git rm --cached dataSources.xml | |
git rm --cached dataSources.ids | |
git rm --cached callpug.iml |
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
[secrets] | |
DJANGO_SECRET_KEY: ill%92_5+gaw!7p5la0h+-=-pb2)l&%11(d@a8+#mff5z$r3^ |
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
# AUTH | |
# ****************************************************************************************** | |
# Step 1: Your application begins the authorization process by redirecting the user to the authorize_uri | |
# | |
# - this is a GET request | |
# - response_type=code, your client_id, and the *urlencoded* redirect_uri are included | |
# ****************************************************************************************** | |
# | |
# authorize_uri = https://login.mailchimp.com/oauth2/authorize?response_type=code&client_id=635959587059&redirect_uri=http%3A%2F%2F192.168.1.8%2Foauth%2Fcomplete.php |
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
$ openssl req -nodes -newkey rsa:2048 -keyout mysite_com.key -out mysite_com.csr | |
Generating a 2048 bit RSA private key | |
.........................+++ | |
.................................................................+++ | |
writing new private key to 'mysite_com.key' | |
----- | |
You are about to be asked to enter information that will be incorporated | |
into your certificate request. | |
What you are about to enter is what is called a Distinguished Name or a DN. | |
There are quite a few fields but you can leave some blank |
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
datetime.strptime("Sun, 04 Jan 2015 00:06:51 +0000"[:-6],"%a, %d %b %Y %H:%M:%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
mysuer ALL=(ALL) NOPASSWD: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
cd ~/src | |
sudo yum groupinstall "Development tools" | |
sudo yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel | |
sudo yum install httpd-devel | |
wget http://python.org/ftp/python/2.7.6/Python-2.7.6.tar.xz | |
tar xf Python-2.7.6.tar.xz | |
cd Python-2.7.6 | |
./configure --prefix=/usr/local --enable-unicode=ucs4 --enable-shared LDFLAGS="-Wl,-rpath /usr/local/lib" | |
sudo make && sudo make altinstall | |
python |