Skip to content

Instantly share code, notes, and snippets.

View cipto-hd's full-sized avatar
🎯
Focusing

Cipto Hadi cipto-hd

🎯
Focusing
  • Lamongan, Indonesia
View GitHub Profile
6:21
sebagai capres ya, tapi tidak ada juga itu, yang misalnya kita mendengar paling tidak media kritik
6:29
dari masyarakat Jawa Tengah, hey pak Ganjar koq sibuk ke DKI, Jawa Tengah masih ada berbagai persoalan, gitu Itu
6:35
nggak, kita nggak mendengar juga itu pak Rizal, bagaimana pak Rizal menurut Pak Rizal, Indra, Indra, Indra kan paham
6:41
sosiologi, kalau di Jawa Tengah, terutama Jawa Tengah, Solo, Jogja Selatan, itu pun apa
6:50
kesulitannya, masalahnya, mereka mayoritas kan nerimo, nganggep ini, ya
@cipto-hd
cipto-hd / main.dart
Created May 30, 2020 16:11
Using Map to describe stories flow in Dart Lang. Awesome
main() {
void nextStory(int userChoice) {
int _storyNumber = 4;
_storyNumber = {
0: {1: 2, 2: 1},
1: {1: 2, 2: 3},
2: {1: 5, 2: 4},
3: {1: 0, 2: 0},
4: {1: 0, 2: 0},
@cipto-hd
cipto-hd / boot-repair-install
Created February 5, 2018 22:42
install boot repair
sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install boot-repair
boot-repair
@cipto-hd
cipto-hd / maps_wordcount.go
Last active October 12, 2017 15:19
A Tour of Go Exercises
package main
import (
"golang.org/x/tour/wc"
"strings"
)
func WordCount(s string) map[string]int {
wordsMap := make(map[string]int)
@cipto-hd
cipto-hd / BladeExtendServiceProvider.php
Last active September 14, 2017 10:08
ServiceProvider that create custom Laravel Blade directive for relative include (from the calling blade tempale)
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
class BladeExtendServiceProvider extends ServiceProvider
{
/**
* Bootstrap the application services.
@cipto-hd
cipto-hd / preg_helper.php
Created September 14, 2017 08:11 — forked from klmr/preg_helper.php
Function to merge several regular expressions into one single expression.
<?php
/**
* Copyright 2008-2009 Konrad Rudolph
* All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@cipto-hd
cipto-hd / index.php
Created September 12, 2017 12:16
entry file for Adminer for enabling plugin to work
<?php
function adminer_object() {
// required to run any plugin
include_once "./plugins/plugin.php";
// autoloader
foreach (glob("plugins/*.php") as $filename) {
include_once "./$filename";
}
@cipto-hd
cipto-hd / css.css
Created December 25, 2014 04:41
gist collection
/*!
* Bootstrap v3.3.1 (http://getbootstrap.com)
* Copyright 2011-2014 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
.btn-default,
.btn-primary,
.btn-success,
.btn-info,
@cipto-hd
cipto-hd / for-while-do_loop
Created June 22, 2014 07:48
for, while, do --> loop
// Write your code below!
for(var i=0;i<3;i++){console.log("Subhanallah")}
var i=3;
while(i--){console.log("Alhamdulillah")}
var i=2;
do{console.log("La ilaha illallah")}while(i--)
@cipto-hd
cipto-hd / rock-paper-scissors_game
Last active August 29, 2015 14:02
Rock, Paper, Scissors choice game, Code Academy course js exercise
var userChoice;
var getUserChoice = function(){
var userChoice = prompt("Choose rock, paper, scissors!");
if((userChoice != null) && !(userChoice==="rock" || userChoice==="paper" || userChoice==="scissors" )) {getUserChoice();}
return userChoice;
};
userChoice = getUserChoice();
if(userChoice === null) console.log("Cancel play the game");