####################################################################
## THIS IS A DRAFT DOCUMENT. ##
## DO NOT APPLY IT ON PRODUCTION SERVER WITHOUT TESTING. ##
####################################################################
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
[Service] | |
Environment=STARTUP_WAIT=30s | |
ExecStart=/home/kobus/.local/bin/power_monitor.sh | |
[Install] | |
WantedBy=default.target |
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 | |
BAT=$(echo /sys/class/power_supply/BAT*) | |
BAT_STATUS="$BAT/status" | |
BAT_CAP="$BAT/capacity" | |
LOW_BAT_PERCENT=20 | |
AC_PROFILE="performance" | |
BAT_PROFILE="balanced" | |
LOW_BAT_PROFILE="power-saver" |
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
# Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved. | |
# | |
# This program is free software; you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License, version 2.0, | |
# as published by the Free Software Foundation. | |
# | |
# This program is also distributed with certain software (including | |
# but not limited to OpenSSL) that is licensed under separate terms, as | |
# designated in a particular file or component or in included license | |
# documentation. The authors of MySQL hereby grant you an additional |
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
# Installing Odoo on AWS | |
These are the steps I ran to get Odoo up and running on AWS using the free tiers (for now). | |
## Setup servers | |
### Create DB | |
Create an Postgres DB on Amazon RDS: | |
https://us-east-2.console.aws.amazon.com/rds/home?region=us-east-2#launch-dbinstance:ct=dbinstances: | |
### Create Server |
This is a short guide on how to set up an encrypted VoIP system using Twilio and Asterisk. I was a little annoyed that just about everything these days still uses unencrypted RTP for media (though just about everyone supports SIP over TLS). So I spent a weekend looking at options, and settled on a totally overkill solution involving Twilio's secure trunking to an Asterisk PBX. While all bets are off once it hits the PSTN, at least you won't be blasting your conversations over the internet in clear text.
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 is strongly based on https://gist.github.com/unbracketed/3380407; | |
thanks to @unbracketed and the various commenters on the page. | |
I've mainly cleaned up the code into basic methods, and included the | |
various suggestions in the comments. Hope this is useful to someone. | |
Make sure you have `requests` and `csv` installed via pip then run it: | |
`python export_gh_issues_to_csv.py` |
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
// License: MIT, feel free to use it! | |
const Intercom = require('intercom-client'); | |
const appId = 'APP_ID' | |
const apiKey = 'APP_KEY' | |
const client = new Intercom.Client(appId, apiKey); | |
const async = require('async-q') | |
//REF: https://developers.intercom.com/reference#iterating-over-all-users | |
//WARNING: you can only have one scroll working at once. you need to wait for that scroll to clear to try again |
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 | |
/** | |
* AMORTIZATION CALCULATOR | |
* @author PRANEETH NIDARSHAN | |
* @version V1.0 | |
*/ | |
class Amortization | |
{ | |
private $loan_amount; | |
private $term_years; |
This gist assumes:
- you have a local git repo
- you have an online remote repository (github)
- you have a server running Apache with git already installed
you should be able to do the same with Java, Perl, RoR, JSP etc. however you'll need to recreate the (rather simple) PHP script
NewerOlder