Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Isa Ansharullah meriororen

🎯
Focusing
  • Bukalapak
  • Jakarta, Indonesia
Block or report user

Report or block meriororen

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@meriororen
meriororen / ch375b_snippet.c
Created Sep 24, 2018
ch375b test code snippet
View ch375b_snippet.c
int do_once = 0;
typedef struct __attribute__((__packed__)) {
uint8_t bLength;
uint8_t bDescriptorType;
uint16_t bcdUSB;
uint8_t bDeviceClass;
uint8_t bDeviceSubClass;
uint8_t bDeviceProtocol;
@meriororen
meriororen / Dockerfile
Last active Jul 19, 2018
Dockerfile for nrfbleprinter environment
View Dockerfile
FROM ubuntu
MAINTAINER Isa Ansharullah <isa.ansharullah@bukalapak.com>
RUN apt-get update
RUN apt-get install -y python
RUN apt-get install -y software-properties-common
RUN add-apt-repository -y ppa:team-gcc-arm-embedded/ppa
RUN apt-get update
RUN apt-get install -y gcc-arm-embedded
@meriororen
meriororen / logo.h
Created Jun 25, 2018
logobukalapak
View logo.h
//------------------------------------------------------------------------------
// File generated by LCD Assistant
// http://en.radzio.dxp.pl/bitmap_converter/
//------------------------------------------------------------------------------
const unsigned char logo_bukalapak [] = {
#if 0
0x00,
#else
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@meriororen
meriororen / chartobcd.c
Created Apr 25, 2018
Ubah char ke bcd dan bcd ke char
View chartobcd.c
#include <stdio.h>
#include <string.h>
char *phone = "081546496933";
char phonebcd[100];
char phonenotbcd[100];
void chartobcd(char *bcd, char *ch, int len)
{
int i = 0;
@meriororen
meriororen / tree.rkt
Created Dec 12, 2017
Having fun with tree in racket!
View tree.rkt
#lang racket
(require pict/tree-layout)
(require pict)
(struct node (val left right) #:transparent)
(define-struct/contract leaf ([x (not/c null?)]) #:transparent)
(define (make-tree xs)
(if (null? xs)
null
View fizzbuzz.rkt
(fizz-buzz-plus (list (cons "Stu" 3) (cons "Ple" 2) (cons "Twak" 7)) 1 90)
output:
'(1
("Ple")
("Stu")
("Ple")
5
("Stu" "Ple")
("Twak")
@meriororen
meriororen / phase.py
Created Nov 9, 2017
Phase between two 2kHz
View phase.py
#!/usr/bin/python
import warnings
warnings.filterwarnings("ignore")
import sys
import numpy as np
import scipy as sy
from numpy import genfromtxt
import matplotlib.pyplot as plt
View ibeacon.c
#include <stdlib.h>
#include <errno.h>
#include <unistd.h>
#include <ctype.h>
#include <signal.h>
#include <stdio.h>
#include <stdbool.h>
#include <sys/time.h>
#include <sys/types.h>
@meriororen
meriororen / i2c.py
Created Jun 15, 2017
i2c setting for adau1361 on rpi
View i2c.py
#!/usr/bin/env python
import smbus
import time
address = 0x38
bus = smbus.SMBus(1)
def set_value(reg, value):
reg_val = [ reg, value ]
View gist:722868178de7fa2c7fc08f35fba1bfb2
`timescale 1ns / 1ps
module testbench_lms ();
reg reset_p;
reg lms_clk;
initial begin
lms_clk = 0;
reset_p = 1;
You can’t perform that action at this time.