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
// Fixing some of the errors in the: | |
// https://gist.github.com/PumpkinSeed/b4993c6ad20ea90e3da8c991a90a91e1 | |
// | |
// 1. It was only able to extract database information, based upon a Struct. | |
// The code now can deal with a struct or a slice with structs. | |
// | |
// 2. The code relied on the json tag in the struct. | |
// You need to match the data with database fields, not the output fields. | |
// This will match up more 1 to 1 as you are in controle of your Database naming and selecting of that data. | |
// If a client expect different named exported json fields, ... |
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
{ | |
"globals" : | |
{ | |
"alwaysShowTabs" : true, | |
"defaultProfile" : "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}", | |
"initialCols" : 120, | |
"initialRows" : 30, | |
"keybindings" : | |
[ | |
{ |
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
// ==UserScript== | |
// @name Realm of the Mad God flash window expander | |
// @namespace http://thunders.spb.ru/user-scripts/src/rotmg-userscript.js | |
// @version 0.2.3 | |
// @description Resize flash window to 1280x1024, 1024x768, 800x600, 640x480. Added Buttons to change Size dynamically =) Saves settings to Cookies. | |
// @include http://www.realmofthemadgod.com/* | |
// @source http://thunders.spb.ru/user-scripts/rotmg/ | |
// @require http://jquery.com/src/jquery-latest.min.js | |
// @copyright 2012+, thunder (ingame thunderspb @ EUNorth Server) | |
// @author thunder, thunder@blackdeath.ru |
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 -e | |
EC2_REGION="us-west-1" | |
DEFAULT_PROGRESS_WAIT=5 | |
# ========== SNAPSHOT WAIT ============== | |
snapshot_id="snap-testtesttest" | |
while [ "$snapshot_progress" != "100%" ]; do | |
sleep "$DEFAULT_PROGRESS_WAIT" |
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 | |
# | |
# Copyright (C) 2015 Alexander Taler | |
# | |
# This is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# | |
# This is distributed in the hope that it will be useful, |
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
# Problem: | |
# | |
# If you use git submodules linking two private github repos, you'll need to create a separate deploy key for each. | |
# Multiple keys are not supported by Ansible, nor does ansible (when running git module) resort to your `.ssh/config` file. | |
# This means your ansible playbook will hang in this case. | |
# | |
# You can however use the ansible git module to checkout your repo in multiple steps, like this: | |
# | |
- hosts: webserver | |
vars: |
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
Philips official: | |
https://www.youtube.com/watch?v=jV8IFZ5Sa_k | |
https://www.youtube.com/watch?v=2x3psK5pjME | |
20min demo video: | |
https://dl.dropboxusercontent.com/u/12487373/Dreambox/AtmoLight_Demo_All_In_One_HD.zip |
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
# Start the old vagrant | |
$ vagrant init centos-6.3 | |
$ vagrant up | |
# You should see a message like: | |
# [default] The guest additions on this VM do not match the install version of | |
# VirtualBox! This may cause things such as forwarded ports, shared | |
# folders, and more to not work properly. If any of those things fail on | |
# this machine, please update the guest additions and repackage the | |
# box. |
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 | |
NAME="app_newretail" # Name of the application | |
DJANGODIR=/data/webapps/python/newretail/${NAME} # Django project directory | |
SOCKFILE=/data/webapps/python/newretail/run/gunicorn.sock # we will communicte using this unix socket | |
USER=py_webapps # the user to run as | |
GROUP=webapps # the group to run as | |
NUM_WORKERS=3 # how many worker processes should Gunicorn spawn | |
DJANGO_SETTINGS_MODULE=${NAME}.settings # which settings file should Django use | |
DJANGO_WSGI_MODULE=${NAME}.wsgi # WSGI module name |
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
<?php | |
include '../vendor/autoload.php'; | |
$classLoader = new \Doctrine\Common\ClassLoader('Entities', __DIR__); | |
$classLoader->register(); | |
$classLoader = new \Doctrine\Common\ClassLoader('Proxies', __DIR__); | |
$classLoader->register(); | |
// config | |
$config = new \Doctrine\ORM\Configuration(); |
NewerOlder