Skip to content

Instantly share code, notes, and snippets.

View zackad's full-sized avatar

zackad

View GitHub Profile
@zackad
zackad / mkss
Created May 20, 2015 03:57
stylish for mobile kaskus
@-moz-document url-prefix("http://m.kaskus.co.id/"), url-prefix("http://fjb.m.kaskus.co.id/") {
/* FOOTER */
footer#site-footer {padding-bottom: 0px;}
#site-footer {margin-top:0px;}
/* POST HEADER */
.author {background-color:#222; color:#fff;}
.author .permalink {color:#fff;}
.author a {color:#fff;}
@zackad
zackad / kastag.user.js
Last active August 29, 2015 14:21
[stuck] get 1st post
// ==UserScript==
// @name Kaskus TS Tagger
// @namespace zackad's script
// @version 0.6
// @description Give TS kaskus a Tag
// @grant GM_addStyle
// @include http://m.kaskus.co.id/*
// @include http://fjb.m.kaskus.co.id/*
// @include /^https?://(www|fjb).kaskus.co.id/(thread|lastpost|post|show_post|product|group/discussion)/*/
// @require http://code.jquery.com/jquery-1.10.1.min.js
@zackad
zackad / flip tv
Created May 25, 2015 03:41
flip the tv emoticon kaskus
@-moz-document domain(kaskus.co.id){
/* FLIP THE TV */
img[title='televisi']{transform: scale(-1, 1);
-moz-transform: scale(-1, 1);
-webkit-transform: scale(-1, 1);
-o-transform: scale(-1, 1);
-khtml-transform: scale(-1, 1);
-ms-transform: scale(-1, 1);}
}
<style>
#olahan{
width: 800px;
}
textarea{
width: 800px;
}
</style>
<script src="http://code.jquery.com/jquery-latest.min.js"></script>
<textarea name="text" onfocus="initiate()"></textarea>
@zackad
zackad / street-view-control-hider.css
Last active December 11, 2015 10:15
Hide Google Street View Controller
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document domain("google.com"), domain("google.co.id") {
#titlecard, .widget-runway-thumbstrip-background, .widget-runway-background-filler.widget-runway-background-filler-many, .widget-runway-growable, .scene-footer-container, #minimap, .app-viewcard-strip, #watermark{
display: none !important;
}
}
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document url("https://simtrans.zackad.tk/layanan") {
#map{
width: 4000px !important;
height: 3000px !important;
float: left;
}
#map .map_container{
@zackad
zackad / fn_str_random_lipsum.sql
Last active June 26, 2024 06:09
Function to generate random text of lorem ipsum in MySQL.
/**
* ALL CREDIT GOES TO ORIGINAL CREATOR
* @Ronald Speelman
* http://moinne.com/blog/ronald/mysql/mysql-lorum-ipsum-generator
*
* renamed function for simplicity
*/
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='STRICT_TRANS_TABLES';
@zackad
zackad / simplify.js
Created August 19, 2016 11:33
Simplify polyline points with Douglas Peuker Algorithm
/**
* Simplifiying polyline points on Lattitide/Longitude format with Douglas Peuker Algorithm
* original version 'http://www.bdcc.co.uk/Gmaps/GDouglasPeuker.js'
*
* @param {array} LatLngLiteral with number
* @param {number} Tolerance of distance in meter
* @return {array} Simplified result
*/
function simplify (source, kink) {
var n_source, n_stack, n_dest, start, end, i, sig;
Sub SplitWorkbook()
'Updateby20140612
Dim FileExtStr As String
Dim FileFormatNum As Long
Dim xWs As Worksheet
Dim xWb As Workbook
Dim FolderName As String
Application.ScreenUpdating = False
Set xWb = Application.ThisWorkbook
DateString = Format(Now, "yyyy-mm-dd hh-mm-ss")
@zackad
zackad / ogr2ogr.sh
Last active March 9, 2021 20:03
ogr2ogr cheatsheet
# export mysql database into shapefile
ogr2ogr out_shapes MYSQL:gis,user=root,password=password
# import shapefile into mysql
ogr2ogr -f MySQL MySQL:database_name,user=root,password=password my_shapefile.shp -nln table_name -a_srs EPSG:4326 -update -overwrite -lco engine=MYISAM
# reproject spatial reference from WGS 84 UTM 48S to Geographic Lattitide/Longitude Coordinate System
ogr2ogr -f "ESRI Shapefile" target_file.shp source_file.shp -s_srs EPSG:32748 -t_srs EPSG:4326