Skip to content

Instantly share code, notes, and snippets.

View tvalentius's full-sized avatar
🦇
Batman

Trimikha Valentius tvalentius

🦇
Batman
View GitHub Profile
var bali = [
{ regency:'Jembrana', population:114863 },
{ regency:'Tabanan', population:209308 },
{ regency:'Badung', population:277536 },
{ regency:'Gianyar', population:208443 },
{ regency:'Klungkung', population:79233 },
{ regency:'Bangli', population:106166 },
{ regency:'Karangasem', population:193787 },
{ regency:'Buleleng', population:294418 },
{ regency:'Denpasar', population:403292 }
var bilanganDesimal = [1,2,3,4,5];
var bilanganBiner = bilanganDesimal.map( (element) => {
return element.toString(2);
})
console.log(bilanganBiner); // ["1", "10", "11", "100", "101"]
var arrayBaru = array.filter(function(element, i, array) {
return (element % 2 === 0);
});
for(var i = 0; i < array.length; i++) {
if( array[i] % 2 ) === 0 ) {
arrayBaru.push(array[i]);
}
}
@tvalentius
tvalentius / gist:68ec08900f8c2716cec82f7d0c23295d
Created October 22, 2017 01:00
My Ethereum Wallet Address
0x8b2a39946e41f5a0e2935cc25cfcf66d249daa6e
module.exports = {
'askingLocationForPlace':[
{
'message':'Coba deh ketik nama lokasi yang kamu cari',
'packageId':1,
'stickerId':2
},
{
'message':'Hai ###, ketik dulu nama lokasinya ya',
'packageId':2,
@tvalentius
tvalentius / .block
Last active May 16, 2023 09:44
HDI Indonesia Choropleth Map
border: no
license: MIT
@tvalentius
tvalentius / .block
Last active June 4, 2023 12:07
Provinces in Indonesia
border: no
license: MIT
@tvalentius
tvalentius / gist:11d6655347fb57ad3a14
Created May 9, 2014 05:08
Testing Laravel4 Facebook connect
<?php
class HomeController extends BaseController {
public function getIndex()
{
//model