Skip to content

Instantly share code, notes, and snippets.

View helmetwearer's full-sized avatar

Daniel Petrikin helmetwearer

View GitHub Profile
class NormalModelWereExtending(BaseModel):
id = models.CharField(primary_key=True, db_column='id')
name = models.CharField(db_column='mycolumn')
class Meta:
managed = False
db_table = 'MyTable'
class MyProxyManager(models.Manager):
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<a id='exploitable'>Show Password</a>
<script type="text/javascript">
$('#exploitable').click(
function(){
console.log($(':password').val());
}
);
</script>
@helmetwearer
helmetwearer / gist:4349ae4812a5b03c3bd7947d6538d726
Created April 17, 2016 09:53
darkest dungeon osx install
This file has been truncated, but you can view the full file.
mv ./.DS_Store ~/Library/Application\ Support/Steam/steamapps/common/DarkestDungeon/_osx/Darkest.app/Contents/Resources/data/.DS_Store
mv ./audio/narration.json ~/Library/Application\ Support/Steam/steamapps/common/DarkestDungeon/_osx/Darkest.app/Contents/Resources/data/audio/narration.json
mv ./campaign/estate/estate.json ~/Library/Application\ Support/Steam/steamapps/common/DarkestDungeon/_osx/Darkest.app/Contents/Resources/data/campaign/estate/estate.json
mv ./campaign/estate/estate.json.bak ~/Library/Application\ Support/Steam/steamapps/common/DarkestDungeon/_osx/Darkest.app/Contents/Resources/data/campaign/estate/estate.json.bak
mv ./campaign/heirloom_exchange/heirloom_exchange.json ~/Library/Application\ Support/Steam/steamapps/common/DarkestDungeon/_osx/Darkest.app/Contents/Resources/data/campaign/heirloom_exchange/heirloom_exchange.json
mv ./campaign/provision/provision.json ~/Library/Application\ Support/Steam/steamapps/common/DarkestDungeon/_osx/Darkest.app/Contents/Resources/data/campaign/provision
class S3PickleAndLocalCache(object):
def __init__(self, local_on=True):
self.bucket_name = settings.S3_CACHE_BUCKET
self.conn = boto.s3.connection.S3Connection(
settings.AWS_ACCESS_KEY_ID,
settings.AWS_SECRET_ACCESS_KEY
)
try:
self.bucket = self.conn.get_bucket(self.bucket_name, validate=True)