Skip to content

Instantly share code, notes, and snippets.

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

Adi adisetiawan

🏠
Working from home
View GitHub Profile
"""Async and await example using subprocesses
Note:
Requires Python 3.6.
"""
import sys
import time
import platform
import asyncio
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2020 Adi Setiawan <adisetiawan@gmail.com>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
<!DOCTYPE html>
<html>
<body>
<!-- 1. The <iframe> (and video player) will replace this <div> tag. -->
<div id="player"></div>
<div>Current Time: <span id="time"></span></div>
<script>
// 2. This code loads the IFrame Player API code asynchronously.
var tag = document.createElement('script');
@adisetiawan
adisetiawan / gammu-install-osx.md
Created July 8, 2020 05:22 — forked from tomysmile/gammu-install-osx.md
Gammu: Install on OSX 10.11 with Wavecom Modem M1306B

Configuring Gammu for Mac OSX 10.11

Requirements

Step by step:

  • Type below command :

TERUSLAH BERSAHABAT SAMPAI WAKTUNYA PULANG

Ketika ada kesempatan, pergilah bersama teman teman lama. Berkumpul - kumpul, bukan sekadar makan, minum dan bersenang, senang tetapi ingat, Waktu hidup kita semakin singkat. Maka dari itu, bangunkanlah Persaudaraan

Mungkin lain waktu kita Tidak akan bertemu lagi.

Mungkin lain waktu kita sudah semakin Susah untuk berjalan.

Umur itu Seperti es batu, Dipakai atau tidak akan tetap mencair dan berakhir.

@adisetiawan
adisetiawan / answer.md
Last active June 11, 2020 02:10
interview answer

1

def commit(item) error = nil
  if action_1(item).success() && action_2(item).success() && action_3(item).success() && action_4(item).success() && action_5(item).success()
    # no error, all succeessful
  else
    error = "something went error" 
  end
 return error
<?php
// example code
$records = array(['satu' => 'satu', 'dua' => 'satu'],
['satu' => 'dua', 'dua' => 'dua'],
['satu' => 'tiga', 'dua' => 'tiga'],
['satu' => 'empat', 'dua' => 'empat'],
['satu' => 'lima', 'dua' => 'lima'],
['satu' => 'enam', 'dua' => 'enam'],
['satu' => 'tujuh', 'dua' => 'tujuh'],
@adisetiawan
adisetiawan / drupal-8-nginx.md
Last active March 12, 2019 01:01
Drupal 8 NGINX Virtual Host
server {
    server_name drupal8.test;
    root /Users/username/drupal8/web;

    location = /favicon.ico {
        log_not_found off;
        access_log off;
    }
@adisetiawan
adisetiawan / slugify.js
Created February 25, 2019 05:15 — forked from hagemann/slugify.js
Slugify makes a string URI-friendly
function slugify(string) {
const a = 'àáäâãåăæçèéëêǵḧìíïîḿńǹñòóöôœṕŕßśșțùúüûǘẃẍÿź·/_,:;'
const b = 'aaaaaaaaceeeeghiiiimnnnoooooprssstuuuuuwxyz------'
const p = new RegExp(a.split('').join('|'), 'g')
return string.toString().toLowerCase()
.replace(/\s+/g, '-') // Replace spaces with -
.replace(p, c => b.charAt(a.indexOf(c))) // Replace special characters
.replace(/&/g, '-and-') // Replace & with 'and'
.replace(/[^\w\-]+/g, '') // Remove all non-word characters
Verifying my Blockstack ID is secured with the address 1EGRyeLqqXMcseD9fFVCh5zfBzc6WQFMTS https://explorer.blockstack.org/address/1EGRyeLqqXMcseD9fFVCh5zfBzc6WQFMTS