Skip to content

Instantly share code, notes, and snippets.

View ausuwardi's full-sized avatar

Agustianes Umbara Suwardi ausuwardi

View GitHub Profile
@paulius-sladkevicius
paulius-sladkevicius / gist:60a84c97e8446f5e152415e874923d66
Created January 30, 2018 14:05
Odoo Parent Left, Right recompute script
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
import sys
from argparse import ArgumentParser
parser = ArgumentParser(description="Recompute parent_left, parent_right")
parser.add_argument('odoo_basedir')
parser.add_argument('odoo_cfg')
parser.add_argument('odoo_db')
parser.add_argument('model', help='Odoo model, e.g. account.account')
@kingspp
kingspp / logging.py
Created April 22, 2017 07:14
Python Comprehensive Logging using YAML Configuration
import os
import yaml
import logging.config
import logging
import coloredlogs
def setup_logging(default_path='logging.yaml', default_level=logging.INFO, env_key='LOG_CFG'):
"""
| **@author:** Prathyush SP
| Logging Setup
@rdlu
rdlu / ipega classic gamepad.cfg
Last active September 23, 2017 13:51
Ipega PG-9021 on Linux (Archlinux) working on Retroarch (Put this on ~/.config/retroarch/autoconfig/udev)
# -------------------------------------------------------------------------------------------------------------------------------------------------
# If RetroArch do NOT detect the controller when connected via Bluetooth and won't even recognize manual binding,
# fix it by adding this udev rule (the line below WITHOUT the # symbol at the beginning!) to "/etc/udev/rules.d/10-local.rules" and reboot.
# SUBSYSTEM=="input", ATTRS{name}=="ipega classic gamepad", MODE="0666", ENV{ID_INPUT_JOYSTICK}="1"
# -------------------------------------------------------------------------------------------------------------------------------------------------
input_driver = "udev"
input_device = "ipega classic gamepad"
input_vendor_id = "32903"
input_product_id = "2012"
@tedmiston
tedmiston / nodejs-tcp-example.js
Last active May 20, 2024 11:27
Node.js TCP client and server example
/*
In the node.js intro tutorial (http://nodejs.org/), they show a basic tcp
server, but for some reason omit a client connecting to it. I added an
example at the bottom.
Save the following server in example.js:
*/
var net = require('net');
@alotaiba
alotaiba / google_text2speech.md
Created February 3, 2012 07:31
Google Text to Speech API

Google Text to Speech API

Base URL: http://translate.google.com/translate_tts
It converts written words into audio. It accepts GET requests.

GET

q
The query string to convert to audio

tl
Translation language, for example, ar for Arabic, or en-us for English