Skip to content

Instantly share code, notes, and snippets.

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

Eko Prastyo temon

🏠
Working from home
View GitHub Profile
@temon
temon / keychron_q10.layout.json
Last active March 8, 2023 13:47
keychron Q10 key mapping
{
"name": "Keychron Q10",
"vendorProductId": 875823521,
"macros": [
"",
"{KC_LSFT,KC_LGUI,KC_4}",
"",
"{KC_LSFT,KC_LALT,KC_LCTL,KC_V}",
"{KC_LSFT,KC_LALT,KC_V}",
"{KC_LSFT,KC_LALT,KC_L}",
implicit class JsonImprovement(json: JsValue) {
def withoutNull = {
def internal(newJson: JsValue): JsValue = {
newJson match {
case JsObject(fields) =>
if (fields.isEmpty) JsNull
else {
fields.foldLeft(new JsObject(Map()))((agg, field) =>
field match {
case (name, JsArray(arrayValues)) => {
/bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=1024
/sbin/mkswap /var/swap.1
/sbin/swapon /var/swap.1
@temon
temon / react-test-todolist.js
Created February 1, 2019 09:24
Todo list with react
import React, { Component } from 'react';
import './App.css';
class App extends Component {
state = {
inputText : '',
data: []
};
onInputChanges = (event) => {