Skip to content

Instantly share code, notes, and snippets.

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

Yana Agun Siswanto bekicot

🏠
Working from home
View GitHub Profile
@bekicot
bekicot / .vimrc
Last active January 8, 2017 16:20
vim rc for deployment sever
" # Usage wget https://gist.githubusercontent.com/bekicot/df5d92becd007f448120b1367730fc45/raw -O ~/.vimrc
syntax enable
colorscheme badwolf
set number
set expandtab
set tabstop=2
set softtabstop=2
@bekicot
bekicot / gist:7dc00eb5c80b170a205200daeb26a023
Last active June 5, 2017 23:59
Ruby Development Environtmen Fedora
sudo -rpm --v import://download.sublimetext.com/sublimehq-rpm-pub.gpg
sudo dnf config-manager --add-repo https://download.sublimetext.com/rpm/stable/x86_64/sublime-text.repo
sudo dnf copr enable mosquito/atom
sudo dnf group install "C Development Tools and Libraries"
sudo dnf install docker-ce clementine postgresql postgresql-contrib postgresql-devel postgresql-server postgresql-lib @Development-tools postgresql-server postgresql-contrib postresql-lib postgresql-server postgresql-contrib postresql-libs postgresql-server postgresql-contrib postgresql-libs postgresql-server postgresql-contrib postgresql-libs openssl-devel readline-devel ruby ruby-devel zlib-deve ruby-devel zlib-devel sqlite-devel chromium openssl-devel readline-devel sublime sublimetext sublime-text atom redis-server redis -y
@bekicot
bekicot / wikidata_island_of_indonesia.sparql
Last active July 24, 2017 14:47
List of island that is located in the teritory of Indonesia
SELECT DISTINCT ?island ?islandLabel ?administrativeLabel ?negaraLabel ?coordinate
WHERE {
?island wdt:P31/wdt:P279* wd:Q23442.
{
{
?wilayahDiIndonesia wdt:P279 wd:Q1434505.
?administrative wdt:P31/wdt:P279* ?wilayahDiIndonesia.
?island wdt:P131 ?administrative.
} UNION {
?island wdt:P17 wd:Q252
@bekicot
bekicot / withinRadius.js
Created July 26, 2017 07:46 — forked from moshmage/withinRadius.js
compares two objects lat/lon and returns true if within provided kms
/**
* is One Point within Another
* @param point {Object} {latitude: Number, longitude: Number}
* @param interest {Object} {latitude: Number, longitude: Number}
* @param kms {Number}
* @returns {boolean}
*/
function withinRadius(point, interest, kms) {
'use strict';
SELECT DISTINCT ?item ?itemLabel ?geonamesId ?coordinate
WHERE {
?item wdt:P31/wdt:P279* wd:Q23442.
?item wdt:P17 wd:Q252 .
?item wdt:P625 ?coordinate
# Remove any triples that has reference in their coordinate
MINUS {
?item p:P625 ?coordinateStatement .
?coordinateStatement prov:wasDerivedFrom ?ref .
@bekicot
bekicot / 1_indonesian_island_entities.json
Created August 3, 2017 05:58
Sample data generated by indonesian_island_geonames_updater
This file has been truncated, but you can view the full file.
{
"Q1003482": {
"pageid": 952976,
"ns": 0,
"title": "Q1003482",
"lastrevid": 514784690,
"modified": "2017-07-06T22:39:12Z",
"type": "item",
"id": "Q1003482",
"labels": {
@bekicot
bekicot / 1_indonesian_island_entities.json
Created August 3, 2017 06:02
Sample data generated by indonesian_island_geonames_updater
This file has been truncated, but you can view the full file.
{
"Q1003482": {
"pageid": 952976,
"ns": 0,
"title": "Q1003482",
"lastrevid": 514784690,
"modified": "2017-07-06T22:39:12Z",
"type": "item",
"id": "Q1003482",
"labels": {

| RC | UFI | UNI | LAT | LONG | DMS_LAT | DMS_LONG | MGRS | JOG | FC | DSG | PC | CC1 | ADM1 | POP | ELEV | CC2 | NT | LC | SHORT_FORM | GENERIC | SORT_NAME_RO | FULL_NAME_RO | FULL_NAME_ND_RO | SORT_NAME_RG | FULL_NAME_RG | FULL_NAME_ND_RG | NOTE | MODIFY_DATE | DISPLAY | NAME_RANK | NAME_LINK | TRANSL_CD | NM_MODIFY_DATE | F_EFCTV_DT | F_TERM_DT | | -- | ---------- | ---------- | -------- | -------- | --------- | ---------- | --------------- | ------- | ---- | ---- | -- | ----- | ---- | --- | ---- | ----- | -- | --- | ------------ | ----------- | ---------------------------------------- | --------------------------------------------- | --------------------------------------------- | ---------------------------------------- | --------------------------------------------

(C) Conventional: a common English-language name for a feature, approved by the US BGN for use in addition to, or in lieu of, a US BGN-approved local official name or in an area where English is not the official language. Example: Rome (the capital of Italy).
(N) Approved: the US BGN-approved local official name for a geographic feature. Example: Roma (the capital of Italy).
(P) Provisional: a geographic name of a feature for which the territorial status is not finally determined or not recognized by the United States.
(D) Unverified: a feature name derived from a source whose official status cannot be verified by the US BGN.
(V) Variant: a former name, a name other than the official name that is found to be in local use, or any other name or spelling found on various sources.
(VA) Anglicized: a special class of Variant name representing an English-language form of an approved local name.