Skip to content

Instantly share code, notes, and snippets.

View kru's full-sized avatar
Tinkering...

Kris Pamungkas kru

Tinkering...
View GitHub Profile
@kru
kru / test.md
Last active February 13, 2021 04:36

Overview

In a company named TW, There is a team consist of 4 members and a leader, we can named this team Eagle team. The following are Eagle team members:

  1. Nicole (team leader)
  2. Irene (member)
  3. Michael (member)
  4. Dan (member)
  5. Kal (member)

In the work day, Nicole always submitting around 10 contacts toward the team, a contact is a potential buyer of company product. Each contact has the following information in them:

SELECT (AVG(TIME_TO_SEC(TIMEDIFF(`lead_routings`.`claimed_at`, `lead_routing_agent`.`notified_at`)))) from `lead_routings` JOIN `lead_routing_agent` ON `lead_routing_agent`.`lead_routing_id` = `lead_routings`.`id` WHERE `lead_routings`.`route_team_id` = :team_id AND `lead_routing_agent`.`notified_at` IS NOT NULL AND `lead_routings`.`claimed_by_kwuid` = :kwuid;
@kru
kru / request.har
Created September 19, 2019 07:27
request from twilio to setting
This file has been truncated, but you can view the full file.
{
"log": {
"version": "1.2",
"creator": {
"name": "WebInspector",
"version": "537.36"
},
"pages": [
{
"startedDateTime": "2019-09-19T07:13:39.414Z",
This file has been truncated, but you can view the full file.
{
"log": {
"version": "1.2",
"creator": {
"name": "WebInspector",
"version": "537.36"
},
"pages": [
{
"startedDateTime": "2019-09-19T07:13:39.414Z",
@kru
kru / query.log
Created August 30, 2019 08:06
Query results for 2039 contacts
This file has been truncated, but you can view the full file.
[2019-08-30 08:01:27] local.INFO: QUERIES:[{"query":"select `id` from `contact_emails` where `contact_id` in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)","bindings":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100],"time":4.26},{"query":"delete from `emails` where `contact_email_id` in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?
/**
* policyCategory: this is either
* 0: General,
* 1: Land & Agriculture,
* 3: Energy
* 4: IPPU & Waste
* 5: Water and Fisheries
*/
const POLICY_CATEGORY = {
GENERAL: 0,
@kru
kru / module.js
Last active February 26, 2018 09:31
var myAwesomeModule = function(members) {
function change() {
publicAPI.showMember = removeFalsy;
}
function getMembers() {
console.log(members);
}
function removeFalsy() {
var myAwesomeModule = (function(members) {
function change() {
publicAPI.showMember = removeFalsy;
}
function getMembers() {
console.log(members);
}
function removeFalsy() {
@kru
kru / closure.js
Last active February 26, 2018 09:54
closure
var myAwesomeModule = function(x) {
return function() {
var y = x * 10;
console.log(y);
};
};
var multiplyBy100 = myAwesomeModule(10);
var multiplyBy25 = myAwesomeModule(2.5);
### React Native 0.48 still can't using java 9
make sure you have brew installed
```/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"```
`brew tap caskroom/version`
`brew cask install java8`