Skip to content

Instantly share code, notes, and snippets.

View weburnit's full-sized avatar
🏠
Working from home

Paul Aan weburnit

🏠
Working from home
View GitHub Profile
{
"additionalProperties": false,
"description": "Segment",
"properties": {
"condition": {
"additionalProperties": false,
"description": "must provide it at least one condition",
"properties": {
"parameterValues": {
"additionalProperties": false,
var path = location.pathname + location.hash;
var opts = {
scope: 'ecommerce',
url: 'http://localhost:8000'
};
window.follower || (window.follower = {});
(function () {
var follower_queue = [];
var methods = ['trackSubmit', 'trackClick', 'trackLink', 'trackForm', 'initialize', 'pageview', 'identify', 'reset', 'group', 'track', 'ready', 'alias', 'debug', 'page', 'once', 'off', 'on', 'personalize'];
var factory = function (method) {
version: '2.2'
services:
kong-migrations:
image: "${KONG_DOCKER_TAG:-kong:latest}"
command: kong migrations bootstrap
depends_on:
db:
condition: service_healthy
environment:
KONG_DATABASE: postgres
@weburnit
weburnit / keybase.md
Created September 11, 2019 06:00
Keybase

Keybase proof

I hereby claim:

  • I am weburnit on github.
  • I am paulaan (https://keybase.io/paulaan) on keybase.
  • I have a public key ASCjR2evoJymG_hGsGRDSttwnwxt9esmIyBGIUMlVa9mYQo

To claim this, I am signing this object:

@weburnit
weburnit / schema-less.java
Created January 20, 2019 09:12
SchemaLess
public class ModellingAPI {
@Autowired
SchemaService schemaService;
@RequestMapping(value = "/model", consumes = MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.POST)
@ResponseBody
public Modelling createModelling(@Valid @RequestBody JsonNode data)
throws UnknownObjectException {
return schemaService.createModel(data);
@weburnit
weburnit / historio.py
Last active January 20, 2019 09:08
Historio
from historio import client
client.historio(server='grpc_address', port=5505)
def somewhere_else_in_your_application():
user = get_current_user() #Get current user
assignment = DynamoDBModel() #your source model
#time to push
client.historio().push(source='assignment', source_id=assignment.id, user_id=user.id, data=model)
@weburnit
weburnit / WebServer.java
Created November 20, 2018 17:26
WebServer.java
import java.io.*;
import java.net.*;
import java.util.ArrayList;
class WebServer {
// this is the port the web server listens on
private static final int PORT_NUMBER = 8080;
// main entry point for the application
public static void main(String args[]) {
@weburnit
weburnit / install_node.sh
Created January 29, 2018 15:16
GobearJS
brew install nodejs
npm install -g yarn
yarn add puppeteer
# save this content to file gobear.js
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch();
const page = await browser.newPage();
@weburnit
weburnit / Wizeline.py
Last active February 14, 2017 09:03
Wizeline Test in Python
class Wizeline(object):
def printNumbers(self, rangeNumber):
for number in range(1, rangeNumber):
self.printNumber(number)
def printNumber(self, number):
mod = self.getMod(number)
result = {
'15': lambda x: 'WizeLine',
'5': lambda x: 'Line',
'3': lambda x: 'Wize',
@weburnit
weburnit / Wizeline.php
Last active February 14, 2017 09:21
Wizeline Test in PHP
<?php
class Wizeline
{
private $range;
public function __construct(int $range)
{
$this->range = $range;
}
public function printNumbers(int $numbers = null)