- http://www.html5rocks.com/en/tutorials/webcomponents/yeoman/
- https://github.com/robdodson/mark-down
- http://stackoverflow.com/questions/18089075/what-is-the-difference-between-polymer-elements-and-angularjs-directives
- https://github.com/basic-web-components/components-dev/wiki/Ten-Principles-for-Great-General-Purpose-Web-Components
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
#include "stdafx.h" | |
#include "ToastActivator_h.h" | |
using namespace Microsoft::WRL; | |
using namespace ABI::Windows::UI::Notifications; | |
using namespace ABI::Windows::Data::Xml::Dom; | |
using namespace Windows::Foundation; | |
class DECLSPEC_UUID("BD8EC9B3-CAEB-465A-B5C0-2ABA5D5839D1") CToastActivator | |
WrlFinal : public Microsoft::WRL::RuntimeClass<Microsoft::WRL::RuntimeClassFlags<Microsoft::WRL::ClassicCom>, INotificationActivationCallback, FtmBase> |
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
pg_createcluster 9.1 testing --start #/etc/postgresql/9.1/testing/ | |
pg_lsclusters | |
pg_dropcluster 9.1 testing --stop | |
#follow with rm -rf or potential error | |
rm -rf /var/lib/postgresql/9.1/testing/ | |
Moved the Write Ahead Log (WAL) to its own partition (so fsyncs of the WAL don't flush all of the dirty data files) |
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
# IMPORTS | |
# replace osv, orm | |
find . -type f -name '*.py' | xargs sed -i 's/from openerp.osv import orm$/from odoo import models/g' | |
find . -type f -name '*.py' | xargs sed -i 's/from openerp.models.orm import Model$/from odoo.models import Model/g' | |
find . -type f -name '*.py' | xargs sed -i 's/osv.osv_memory/models.TransientModel/g' | |
find . -type f -name '*.py' | xargs sed -i 's/osv.osv/models.Model/g' | |
find . -type f -name '*.py' | xargs sed -i 's/osv.except_osv/UserError/g' | |
find . -type f -name '*.py' | xargs sed -i 's/osv\./models./g' | |
find . -type f -name '*.py' | xargs sed -i 's/\<orm\./models./g' | |
find . -type f -name '*.py' | xargs sed -i 's/\(import .*\), osv/\1, models/g' |
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
# PS: | |
# - Extract your own kaskus oauth consumer_key & consumer_secret frm native app. Ref: http://seriot.ch/abusing_twitter_api.php#3 | |
# - No public doc found, but here i attach an api sample sniffed from mitmproxy | |
import urllib, urllib2 | |
import time | |
import oauth.oauth as oauth | |
import string | |
import random | |
import sys, json |
Here you may see about bi-directional replication we have used http://2ndquadrant.com/en/resources/bdr/
We use here 64bit ubuntu 14.04 with docker to demonstrate our replication solution. First we need to install docker .
sudo su
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" > /etc/apt/sources.list.d/docker.list
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
This gist provides a simple setup to add Sentry logging to OpenERP/Odoo. | |
As Odoo's logging setup is rather limited, I'm using syslog to collect and forward logs to Sentry. | |
These scripts should run without any modification on an Ubuntu based server, assuming the paths and user names for openerp match with the ones in the `supervisord.conf` file. | |
To have rsyslog2sentry run fine, you'll need some python pagkages installed | |
$ pip install raven loggerglue |
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
-- enable dblink support | |
CREATE EXTENSION dblink; | |
-- create the connection | |
SELECT dblink_connect('myconn', 'dbname=tracking-service'); | |
-- then use the connection | |
SELECT "oauthId" | |
FROM "56_profile" local | |
INNER JOIN dblink('myconn','SELECT DISTINCT user_id FROM "event"') |
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 | |
# variables | |
# listening address for jupyter. set to localhost if only accessing locally. | |
read -p $'\n\e[32mServer static IP address\e[m: ' ipAddress | |
# Set this either as parent or direct working directory of the project you want to work on. | |
read -p $'\n\e[32mProject Parent Directory\e[m: ' WorkingDirectory | |
echo -e "\n...\e[32mGenerating random token\e[m...\n" |
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
upstream odoo9_xmlrpc { | |
server <xmlrpc address>; | |
} | |
upstream odoo9_longpolling { | |
server <longpolling address>; | |
} | |
server { | |
listen 80; |
OlderNewer