Skip to content

Instantly share code, notes, and snippets.

View siayi's full-sized avatar
💭
I may be slow to respond.

Ayi Sumarna siayi

💭
I may be slow to respond.
View GitHub Profile
@siayi
siayi / gist:0131608100906071e47d
Created March 24, 2016 04:09
this is the code to prevent the "duplication"
add_action('after_setup_theme', 'remove_custom_thumbnails', 30);
function remove_custom_thumbnails(){
remove_image_size('tc-rectangular-size'); //or uncheck the proper option
remove_image_size('tc-thumb');
remove_image_size('slider-full');
remove_image_size('slider');
}
@siayi
siayi / function.php
Last active March 24, 2016 04:11
Stop Customizr theme from making duplicates of my images. This is the code to prevent the "duplication"
add_action('after_setup_theme', 'remove_custom_thumbnails', 30);
function remove_custom_thumbnails(){
remove_image_size('tc-rectangular-size'); //or uncheck the proper option
remove_image_size('tc-thumb');
remove_image_size('slider-full');
remove_image_size('slider');
}
@siayi
siayi / owncloud.log
Created April 6, 2016 12:59
OwnCloud on Ciburial Server /var/www/html/datadesa/
{"reqId":"FU6X46nFnQu5UVjU4nZe","remoteAddr":"192.168.1.104","app":"PHP","message":"Undefined offset: 0 at \/var\/www\/html\/datadesa\/lib\/private\/setup\/mysql.php#46","level":3,"time":"2016-04-05T14:27:46+00:00"}
{"reqId":"FU6X46nFnQu5UVjU4nZe","remoteAddr":"192.168.1.104","app":"no app in context","message":"Exception: {\"Exception\":\"DomainException\",\"Message\":\"Contacts tables are missing. Nothing to do.\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/html\\\/datadesa\\\/apps\\\/dav\\\/lib\\\/migration\\\/migrateaddressbooks.php(83): OCA\\\\Dav\\\\Migration\\\\AddressBookAdapter->setup()\\n#1 \\\/var\\\/www\\\/html\\\/datadesa\\\/apps\\\/dav\\\/appinfo\\\/application.php(186): OCA\\\\Dav\\\\Migration\\\\MigrateAddressbooks->setup()\\n#2 \\\/var\\\/www\\\/html\\\/datadesa\\\/apps\\\/dav\\\/appinfo\\\/install.php(26): OCA\\\\Dav\\\\AppInfo\\\\Application->migrateAddressbooks()\\n#3 \\\/var\\\/www\\\/html\\\/datadesa\\\/lib\\\/private\\\/installer.php(621): include('\\\/var\\\/www\\\/html\\\/d...')\\n#4
//<![CDATA[
function pageNavi(o){var m=location.href,l=m.indexOf("/search/label/")!=-1,a=l?m.substr(m.indexOf("/search/label/")+14,m.length):"";a=a.indexOf("?")!=-1?a.substr(0,a.indexOf("?")):a;var g=l?"/search/label/"+a+"?updated-max=":"/search?updated-max=",k=o.feed.entry.length,e=Math.ceil(k/pageNaviConf.perPage);if(e<=1){return}var n=1,h=[""];l?h.push("/search/label/"+a+"?max-results="+pageNaviConf.perPage):h.push("/?max-results="+pageNaviConf.perPage);for(var d=2;d<=e;d++){var c=(d-1)*pageNaviConf.perPage-1,b=o.feed.entry[c].published.$t,f=b.substring(0,19)+b.substring(23,29);f=encodeURIComponent(f);if(m.indexOf(f)!=-1){n=d}h.push(g+f+"&max-results="+pageNaviConf.perPage)}pageNavi.show(h,n,e)}pageNavi.show=function(f,e,a){var d=Math.floor((pageNaviConf.numPages-1)/2),g=pageNaviConf.numPages-1-d,c=e-d;if(c<=0){c=1}endPage=e+g;if((endPage-c)<pageNaviConf.numPages){endPage=c+pageNaviConf.numPages-1}if(endPage>a){endPage=a;c=a-pageNaviConf.numPages+1}if(c<=0){c=1}var b='<span class="pages">Pages '+e+' of '+a
@siayi
siayi / DataAPBDES2017_Kab_Bandung.sql
Created March 9, 2017 05:26
Database Aplikasi Siskeudes Kabupaten Bandung TA 2017
This file has been truncated, but you can view the full file.
-- phpMyAdmin SQL Dump
-- version 4.6.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: 09 Mar 2017 pada 12.15
-- Versi Server: 5.5.49
-- PHP Version: 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
@siayi
siayi / Daftar Desa se-Kabupaten Bandung
Last active September 14, 2017 14:07
Daftar Desa se-Kabupaten Bandung
<div class="_536- uiBoxWhite" id="u_0_11"><div class="phs _536_"><div id="u_0_12"><span class="_4-rr"><label class="_5370 _4-rs _4-rt uiButton" for="u_0_2"><img class="mrs _5371 _5372 customimg img" src="https://static.xx.fbcdn.net/rsrc.php/v3/y4/r/-PAXP-deijE.gif" alt="" width="1" height="1"><input value="Tebal" type="button" data-wysihtml5-command="bold" id="u_0_2"></label><label class="_5370 _4-rs _4-rt uiButton" for="u_0_3"><img class="mrs _5371 _5373 customimg img" src="https://static.xx.fbcdn.net/rsrc.php/v3/y4/r/-PAXP-deijE.gif" alt="" width="1" height="1"><input value="Kursif" type="button" data-wysihtml5-command="italic" id="u_0_3"></label><label class="_5370 _4-rs _4-rt uiButton" for="u_0_4"><img class="mrs _5371 _5374 customimg img" src="https://static.xx.fbcdn.net/rsrc.php/v3/y4/r/-PAXP-deijE.gif" alt="" width="1" height="1"><input value="Garis bawah" type="button" data-wysihtml5-command="underline" id="u_0_4"></label></span><span class="_4-rr _5378"><label class="_5370 _4-rs _4-rt uiButton" for="
@siayi
siayi / md2wp
Created September 19, 2017 03:19 — forked from Gen2ly/md2wp
Convert Markdown to Wordpress blogging format
#!/bin/bash
# Convert Markdown to Wordpress blogging format
# Required program(s)
req_progs=(ascii2uni pandoc)
for p in ${req_progs[@]}; do
hash "$p" 2>&- || \
{ echo >&2 " Required program \"$p\" not installed."; exit 1; }
done
@siayi
siayi / markdown to html.txt
Created September 25, 2017 09:28
Convert markdown files to html
Yep, have a look at http://pandoc.org/ or markdown-it https://github.com/markdown-it
It now depends, whether you want to merge the HTMl files or not:
# Single output files
for f in *.md ; do pandoc ${f} -f markdown -t html -s -o ${f}.html ; done
# One output file
pandoc *.md -f markdown -t -s html -o merged.html
@siayi
siayi / process.sh
Created September 25, 2017 11:10 — forked from d6y/process.sh
Batch convert HTML to Markdown
#!/bin/bash
# Converts HTML from https://exportmyposts.jazzychad.net/ exports to Markdown
POSTS_DIR=/Users/richard/Desktop/d6y/posts
for file in $POSTS_DIR/*.html
do
echo $file
@siayi
siayi / md_to_rst.sh
Created September 25, 2017 11:27 — forked from hugorodgerbrown/md_to_rst.sh
Shell script for converting a batch of *.md files into *.rst using pandoc.
# This script was created to convert a directory full
# of markdown files into rst equivalents. It uses
# pandoc to do the conversion.
#
# 1. Install pandoc from http://johnmacfarlane.net/pandoc/
# 2. Copy this script into the directory containing the .md files
# 3. Ensure that the script has execute permissions
# 4. Run the script
#
# By default this will keep the original .md file