Skip to content

Instantly share code, notes, and snippets.

View soltrinox's full-sized avatar
🤖
Building Cybernetic Systems

Mr. Rosario soltrinox

🤖
Building Cybernetic Systems
View GitHub Profile
CACHE GIT CREDENTIALS ON UNIX
git config --global credential.helper cache
git config --global credential.helper "cache --timeout=360000"
ON OSX
git config --global credential.helper osxkeychain
git config --global credential.helper "cache --timeout=360000"
@soltrinox
soltrinox / mongo-autostart-osx.md
Created May 27, 2016 07:30 — forked from subfuzion/mongo-autostart-osx.md
mongo auto start on OS X

Install with Homebrew

brew install mongodb

Set up launchctl to auto start mongod

$ ln -sfv /usr/local/opt/mongodb/*.plist ~/Library/LaunchAgents

/usr/local/opt/mongodb/ is a symlink to /usr/local/Cellar/mongodb/x.y.z (e.g., 2.4.9)

@soltrinox
soltrinox / gist:0214dbd2475ea8b09d28256bf150959c
Created August 15, 2016 07:41
Upload File Angular-bootstrap
http://jsbin.com/saqico/1/edit?html,js,output
@soltrinox
soltrinox / PROFILE_ACCOUNTS.csv
Created September 11, 2016 01:21
USER PROFILES, ACCOUNTS, FAKE, DEMO, GENERATOR
We can't make this file beautiful and searchable because it's too large.
Number,Gender,NameSet,Title,GivenName,MiddleInitial,Surname,StreetAddress,City,State,StateFull,ZipCode,Country,CountryFull,EmailAddress,Username,Password,BrowserUserAgent,TelephoneNumber,TelephoneCountryCode,MothersMaiden,Birthday,Age,TropicalZodiac,CCType,CCNumber,CVV2,CCExpires,NationalID,UPS,WesternUnionMTCN,MoneyGramMTCN,Color,Occupation,Company,Vehicle,Domain,BloodType,Pounds,Kilograms,FeetInches,Centimeters,GUID,Latitude,Longitude
1,female,American,Mrs.,Lois,R,Guzman,"1974 Locust Street",Americus,GA,Georgia,31709,US,"United States",[email protected],Ateres,eoghusheH7,"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12) AppleWebKit/602.1.50 (KHTML, like Gecko) Version/10.0 Safari/602.1.50",229-942-9758,1,Albright,7/13/1952,64,Cancer,MasterCard,5528180050696196,439,7/2017,253-60-6592,"1Z 169 213 49 8118 722 4",2547418964,94834535,Orange,Astronomer,"Jacob Reed and Sons","2006 Mercury Monterey",gobrookvillepa.com,O+,178.0,80.9,"5' 2""",157,6908b21b-4860-4b1c-bc09-2c6f2fc69118,32.040706,-84.217819
2,female
@soltrinox
soltrinox / DEDUPE.md
Last active April 8, 2019 20:13
DEDUPE MYSQL TABLE

Step 1: Move the non duplicates (unique tuples) into a temporary table

CREATE TABLE new_table as SELECT * FROM old_table WHERE 1 GROUP BY [column to remove duplicates by];

Step 2: delete delete the old table

We no longer need the table with all the duplicate entries, so drop it!

DROP TABLE old_table;

@soltrinox
soltrinox / gist:a241aaf2937c144d811a4148a9e0c575
Created November 29, 2017 01:30
Arduino Stepper Motor Control Nema 17 + A4988 controller
const int stepPin = 3;
const int dirPin = 4;
const int msPins[] = {8, 9, 10};
const bool msVals[5][3] = {{false, false, false},
{true, false, false},
{false, true, false},
{true, true, false},
{true, true, true}};
Set up port forwarding
You can use the forward command to set up arbitrary port forwarding, which forwards requests on a specific host port to a different port on a device. The following example sets up forwarding of host port 6100 to device port 7100:
adb forward tcp:6100 tcp:7100
The following example sets up forwarding of host port 6100 to local:logd:
adb forward tcp:6100 local:logd
@soltrinox
soltrinox / lex.js
Created June 28, 2020 11:47 — forked from gittimos/lex.js
Using the Lex postText API with AWS Node.js SDK
var AWS = require('aws-sdk');
AWS.config.update({region: 'us-east-1'});
var lexruntime = new AWS.LexRuntime();
var params = {
botAlias: '$LATEST', /* required, has to be '$LATEST' */
botName: 'BOT', /* required, the name of you bot */
inputText: 'TEXT', /* required, your text */
userId: 'USER', /* required, arbitrary identifier */
@soltrinox
soltrinox / gist:53143bdb79e17054c1ea5d5da467afad
Created July 1, 2020 01:33
THERMAL TRANSFORM for IR camera
greyscale
range: max - min
280-12f
123 - 89
36,000
1.0000 - 0.0000
80
60 - [80] - 120
reference temp device set ambient thermal baseline
remote update software
781234123412.zip < sever http://update.xyz.ai/clientUpdateUrl ->
folder/23214114133.old1.zip < local
================
client checks url to see if file is different nbame than local file
if new name and new stamp download
explode and replace current files,