Skip to content

Instantly share code, notes, and snippets.

View darrensapalo's full-sized avatar

Darren darrensapalo

View GitHub Profile
@darrensapalo
darrensapalo / dataset.txt
Created September 25, 2018 16:37
Growth tracking
{"date":"2018-09-26T00:13:09+08:00","small_wins":366,"right":51}
{"date":"2018-09-24T22:01:34+08:00","small_wins":355,"right":51}
{"date":"2018-09-24T08:47:18+08:00","small_wins":338,"right":49}
{"date":"2018-09-22T23:23:49+08:00","small_wins":292,"right":46}
{"date":"2018-09-22T17:06:17+08:00","small_wins":286,"right":45}
@darrensapalo
darrensapalo / DailyReward.txt
Created December 21, 2018 16:34
Updated Stolao's daily reward script to work for Hercules server
//===== EinherjarRO Scripts ==================================
//= Requested
//===== By: ==================================================
//= Stolao
//===== Current Version: =====================================
//= 2.1D
//===== Compatible With: =====================================
//= Hercules
//===== Description: =========================================
//= A reward system for players who play more frequently
@darrensapalo
darrensapalo / Using pdfkit
Last active March 14, 2019 13:00
fs.readFileSync is undefined.md
I've been using pdfkit and have been encpuntering # Pdfkit
I've been using pdfkit and have been encountering this problem that says:
```
fs.readFileSync is undefined.
```
It took me a while to understand what the whole problem was, so let me walk you through my experience.
I needed a pdf generator on my ionic 3, angular 5 cross platform mobile app.
@darrensapalo
darrensapalo / standard_ups_and_downs.json
Created September 2, 2019 14:58
Data for my Growth article
[{"index":0,"value":0,"name":"standard"},{"index":1,"value":0.008118586489613184,"name":"standard"},{"index":2,"value":0.0160921426061105,"name":"standard"},{"index":3,"value":0.0237785927496526,"name":"standard"},{"index":4,"value":0.031041710667941577,"name":"standard"},{"index":5,"value":0.03775389485892593,"name":"standard"},{"index":6,"value":0.04379876825733662,"name":"standard"},{"index":7,"value":0.04907354924039483,"name":"standard"},{"index":8,"value":0.0534911456470562,"name":"standard"},{"index":9,"value":0.05698192914833425,"name":"standard"},{"index":10,"value":0.0594951538186062,"name":"standard"},{"index":11,"value":0.060999990006668406,"name":"standard"},{"index":12,"value":0.06148615244299108,"name":"standard"},{"index":13,"value":0.060964109786442025,"name":"standard"},{"index":14,"value":0.05946487134128409,"name":"standard"},{"index":15,"value":0.05703935528976252,"name":"standard"},{"index":16,"value":0.05375735131158291,"name":"standard"},{"index":17,"value":0.04970609872532978,"name":"
@darrensapalo
darrensapalo / for-ionic-projects.sh
Created September 13, 2019 03:30
one line CLI command to change `compile` into `implementation` on your android projects
sed -i '' 's/compile /implementation /g' platforms/android/app/build.gradle
@darrensapalo
darrensapalo / Gitlab-runner-register.fish
Created September 18, 2019 04:18
Interactive process for registering a gitlab runner.
#! usr/local/bin/fish
# My preferred executor type is docker.
set executorType docker
# My preferred docker image is node 10.16.
set dockerImage node:10.16.2-jessie
# Helper utility function to confirm choices.
# https://stackoverflow.com/questions/16407530/how-to-get-user-confirmation-in-fish-shell
@darrensapalo
darrensapalo / connection.js
Created October 11, 2019 12:06
sequelize connection not working for MSSQL
"use strict";
const crypto = require('crypto');
const os = require('os'); // $FlowFixMe
const constants = require('constants');
const _require = require('tls'),
@darrensapalo
darrensapalo / coborrower-form-address-activation-bug.log
Created February 5, 2020 13:58
Address activation bug on coborrower form
main-es2015.js:36436 StorageHandler: Successfully constructed the storage handler.
main-es2015.js:36436 APIService: Successfully created the API Service.
vendor-es2015.js:68662 Angular is running in the development mode. Call enableProdMode() to enable the production mode.
vendor-es2015.js:96250 Ionic Native: deviceready event fired after 949 ms
main-es2015.js:36456 App: JWT in localStorage does not exist.
warn @ main-es2015.js:36456
main-es2015.js:36436 App: Platform is now ready.
plugins/cordova-sqlite-storage/www/SQLitePlugin.js:175 OPEN database: _ionicstorage
plugins/cordova-sqlite-storage/www/SQLitePlugin.js:106 new transaction is queued, waiting for open operation to finish
plugins/cordova-sqlite-storage/www/SQLitePlugin.js:179 OPEN database: _ionicstorage - OK
@darrensapalo
darrensapalo / notes.ts
Created June 2, 2020 09:14
Discussions with Baron regarding dynamic processing
import { OperatorFunction, pipe, from } from 'rxjs';
import { map, tap } from 'rxjs/operators';
import axios from 'axios';
interface Operation {
// config yml
type: 'map'|'filter';
};
const operations: Operation[] = [];
@darrensapalo
darrensapalo / testdata.txt
Created June 5, 2020 13:00
test 100 data csv rapidpass
passType,aporType,firstName,middleName,lastName,suffix,company,idType,identifierNumber,platenumber,mobileNumber,email,originName,originStreet,originCity,originProvince,destName,destStreet,destCity,destProvince,remarks
INDIVIDUAL,AG,mykLsiqi,midsiqi,lastsiqi,V,DevCon PH 0,DFA,BULK0407-0832PM-0,,09175983424,darren.sapalo@gmail.com,Origin,484536 siqi Street,Ligao City,Sorsogon,Destination,0 siqi Road,Para�aque City,Zamboanga del Sur,test remark 1586268473.6676080
INDIVIDUAL,BA,mykLmoqu,midmoqu,lastmoqu,IV,DevCon PH 1,PWD,BULK0407-0832PM-1,,09354936694,diazjezza@gmail.com,Origin,371238 moqu Street,Valenzuela City,Southern Leyte,Destination,1 moqu Road,Muntinlupa City,Zamboanga,test remark 1586268473.6676081
INDIVIDUAL,PH,mykLrime,midrime,lastrime,IV,DevCon PH 2,POS,BULK0407-0832PM-2,,09188181951,wdamarillo@agsx.net,Origin,943958 rime Street,Pasig City,Quezon,Destination,2 rime Road,Malabon City,Albay,test remark 1586268473.6676082
INDIVIDUAL,LW,mykLqara,midqara,lastqara,X,DevCon PH 3,SSS,BULK0407-0832PM-3,,091783