Skip to content

Instantly share code, notes, and snippets.

View shadowofsoul's full-sized avatar

David Rene Comba Lareu shadowofsoul

View GitHub Profile
@shadowofsoul
shadowofsoul / npm-run-start-daemonize.sh
Created December 8, 2020 11:57
npm run start at boot and daemonize witn pm2
#cd directory where to run
npm install -g pm2
pm2 start npm -- start
pm2 save
pm2 startup
@shadowofsoul
shadowofsoul / rendertron-startup.sh
Created November 23, 2020 12:19
Ubuntu / Debian startup init.d boot script for rendertron
#!/bin/bash
#
### BEGIN INIT INFO
# Required-Start: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
### END INIT INFO
# description: Rendetron startup service
# processname: rendertron.js
# author. David R. Comba Lareu (@shadowofsoul) at Ipsilon Developments (@ipsilondev)
@shadowofsoul
shadowofsoul / run.sh
Created May 27, 2016 14:32 — forked from grapefrukt/run.sh
Run script that fixes missing libraries for 32 bit builds only
#!/bin/bash
# making sure we're in the correct dir
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"; cd ${DIR}
# get the architecture
arch=$(uname -m)
# this hack is only needed on 32 bit for some reason
if [[ ''$arch'' == ''i686'' ]]; then
# make sure libraries are loaded from the local directory
@shadowofsoul
shadowofsoul / gist:56fad6697ccdf8e4d240
Created March 1, 2016 13:56
example of assets adapt to screen in OpenFL
screenResolutoExpon = 1;
//device screen resolution
screenWidth = Capabilities.screenResolutionX;
screenHeight = Capabilities.screenResolutionY;
//if screen has more than 1500px of width or height, use the x2 set's of assets and set the exponential to 2
if (screenWidth > Constants.limitSizeScreen || screenHeight > Constants.limitSizeScreen) {
screenResolutoExpon = 2;
AssetLib.folderAsset = "high";
@shadowofsoul
shadowofsoul / gist:5647169
Created May 24, 2013 23:21
mail of google banning the paid apps for argentine accounts
Hello david rene,
We are writing to you today to inform you that Google Play will no longer be able to accept payments on behalf of developers registered in Argentina starting June 27, 2013. Developers based in Argentina may continue to offer free applications in the Google Play store. All applications requiring the billing permission as well as in-app products will be unpublished from the Google Play store on June 27, 2013. A payout for your earnings through this time will be made on July 22, 2013. If your accumulated earnings at that time do not meet the payout threshold, you may close your linked AdSense account to receive a final payment.
If you are legally able to do business in one of the other supported countries and otherwise satisfy the Google Wallet Terms of Service for that country, you may register for a Google Wallet Merchant Center account in that country and transfer your applications to it. To review the Google Wallet Merchant Center account Terms of Service, go to this link:
https://checko
@shadowofsoul
shadowofsoul / gist:5643183
Created May 24, 2013 12:32
the function transformCoordScale(float x, float y) will give you the real coordinates in the drawables from the Event.x and Event.y of the touch event (function for TouchImageView.java)
//this function will transform the coordinated in the touch event to the bitmap that the imageview contain
// done by @ipsilondev
public PointF transformCoordScale(float x, float y){
matrix.getValues(m);
float origW = this.getDrawable().getIntrinsicWidth();
float origH = this.getDrawable().getIntrinsicHeight();
float iW = (origW*m[Matrix.MSCALE_X]);
float iH = (origH*m[Matrix.MSCALE_Y]);
float scaleW = origW/iW;
float scaleH = origH/iH;