Skip to content

Instantly share code, notes, and snippets.

View jmeridth's full-sized avatar
:shipit:

Jason Meridth jmeridth

:shipit:
View GitHub Profile
class AnonObject(object):
def __init__(self, **kwargs):
self.__dict__.update(kwargs)
@jmeridth
jmeridth / error.txt
Created August 17, 2014 04:31
error when logging in to edit home page on new django-cms install
AttributeError at /en-us/
'NoneType' object has no attribute 'has_change_permission'
Request Method: GET
Request URL: http://192.168.100.100:5000/en-us/
Django Version: 1.6.5
Exception Type: AttributeError
Exception Value:
'NoneType' object has no attribute 'has_change_permission'
Exception Location: /home/vagrant/.virtualenvs/playworks_cms/local/lib/python2.7/site-packages/cms/templatetags/cms_tags.py in get_processors, line 352
Python Executable: /home/vagrant/.virtualenvs/playworks_cms/bin/python
@jmeridth
jmeridth / test1.txt
Created December 31, 2014 15:08
test getting multiple raw files remotely
test1
@jmeridth
jmeridth / lostechies.conf
Last active August 29, 2015 14:25
LT apache conf
<VirtualHost *:80>
ServerName lostechies.com
ServerAlias www.lostechies.com
ServerAlias tddfirestarter.lostechies.com
Redirect permanent / https://lostechies.com/
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.lostechies\.com$ [NC]
@jmeridth
jmeridth / Capfile
Created January 29, 2009 01:58
Capfile for capistrano
load 'deploy' if respond_to?(:namespace) # cap2 differentiator
Dir['vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) }
load 'config/deploy'
set :application, "mydomain.com"
set :domain, "mydomain.com"
set :repository, "TBD"
set :deploy_to, "/home/myuser/public_html/#{domain}"
set :scm, :git
set :deploy_via, :copy
#ssh_options[:keys] = "~#{ENV['USER']}/.ssh/id_rsa"
ssh_options[:port] = 314
#ssh_option[:paranoid] = false
@jmeridth
jmeridth / IntegrityApp_git_post_receive.rb
Created May 28, 2009 13:33
integrity ci githook post-receive
#!/usr/bin/env ruby
require 'rubygems'
require 'net/http'
require 'net/https'
require 'json'
# EDIT POST_RECEIVE_URL
POST_RECEIVE_URL = 'https://my.domain.com/application_name/push'
@jmeridth
jmeridth / rijndael_test.cs
Created December 14, 2009 12:43
C# rijdael test
[Test]
public void rijndael_test()
{
var rijndaelAlg = Rijndael.Create();
byte[] data = Encoding.UTF8.GetBytes("1234567890abcdef");
rijndaelAlg.Key = new ASCIIEncoding().GetBytes("pass123pass123pass123pass123pass");
rijndaelAlg.IV = new ASCIIEncoding().GetBytes("1234567890abcdef");
using (var memoryStream = new MemoryStream())
using (var cryptoStream = new CryptoStream(memoryStream, rijndaelAlg.CreateEncryptor(), CryptoStreamMode.Write))
{
@jmeridth
jmeridth / crypt_rijndael_add_iv.rb
Created December 14, 2009 12:43
ruby rijndael encryption - add IV
module Crypt
class Rijndael
def vector() @vector; end
alias orig_initialize initialize
def initialize(key, vector, keyBits = 256, blockBits = 128)
@vector = vector
orig_initialize(key, keyBits, blockBits)
end
@jmeridth
jmeridth / rijndael_test
Created December 14, 2009 12:44
ruby crypt/rijndael encryption gem test
>> require 'crypt/rijndael'
=> []
>> require 'crypt'
=> []
>> r = Crypt::Rijndael.new("pass123pass123pass123pass123pass","1234567890abcdef")
=> #<Crypt::Rijndael:0x2650fd4 @rounds=14, @round_keys=[[[112, 49, 97, 50], [97, 50, 115, 51], [115, 51, 115, 112], [115, 112, 49, 97]], [[115, 51, 115, 112], [115, 112, 49, 97], [49, 97, 50, 115], [50, 115, 51, 115]], [[158, 175, 206, 252], [238, 220, 175, 156], [252, 207, 188, 204], [34, 82, 99, 2]], [[195, 240, 131, 243], [173, 221, 236, 141], [122, 27, 41, 90], [69, 54, 5, 118]], [[193, 110, 160, 92], [80, 140, 35, 191], [196, 11, 183, 123], [47, 125, 30, 28]], [[137, 121, 250, 9], [165, 120, 148, 25], [91, 64, 105, 51], [217, 239, 234, 156]], [[17, 127, 223, 131], [147, 31, 60, 131], [26, 17, 166, 221], [46, 83, 77, 81]], [[101, 28, 230, 239], [73, 49, 165, 188], [154, 218, 179, 128], [8, 231, 13, 145]], [[124, 3, 220, 95], [94, 65, 125, 254], [155, 138, 44, 241], [241, 162, 239, 190]], [[170, 182, 80, 191], [242, 195, 102, 218], [59, 225, 82, 210], [166, 65, 76, 2