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 / getSongFromYoutube.py
Created October 28, 2021 05:38 — forked from beantowel/getSongFromYoutube.py
script for downloading MTG-QBH dataset collection
import os
import click
import re
import csv
import numpy as np
from selenium import webdriver
from bs4 import BeautifulSoup
from urllib.parse import quote_plus
YOUTUBE_QUERY = 'https://www.youtube.com/results?search_query='
@siayi
siayi / wordpress_export_to_json.php
Created October 27, 2021 18:41 — forked from jsnelders/wordpress_export_to_json.php
Export all core WordPress data (posts, pages, attachments, comments, tags, categories and users) to a JSON formatted file.
<?php
/**
* Plugin Name: WordPress Export to JSON
* Plugin URI: https://jsnelders.com/
* Description: Export all WordPress posts, pages, comments, tags, commments and users to a JSON file.
* Author: Jason Snelders
* Author URI: http://jsnelders.com
* Version: 2020-01-30.1
**/
@siayi
siayi / wordpress_export-post-data.php
Created October 27, 2021 18:40 — forked from robinnorth/wordpress_export-post-data.php
WordPress: Simple, configurable script to export post data to a CSV file
<?php
/**
* Export WordPress post data to CSV
* Based on <http://stackoverflow.com/a/3474698> and <http://ran.ge/2009/10/27/howto-create-stream-csv-php/>
*/
/**
*********************************************************************
* Configuration
*********************************************************************
@siayi
siayi / wordpress_export-post-data.php
Created October 27, 2021 18:40 — forked from robinnorth/wordpress_export-post-data.php
WordPress: Simple, configurable script to export post data to a CSV file
<?php
/**
* Export WordPress post data to CSV
* Based on <http://stackoverflow.com/a/3474698> and <http://ran.ge/2009/10/27/howto-create-stream-csv-php/>
*/
/**
*********************************************************************
* Configuration
*********************************************************************
@siayi
siayi / wxr.py
Created October 27, 2021 18:39 — forked from chrono-meter/wxr.py
#!/usr/bin/env python3
from xml.etree import ElementTree
from pathlib import Path
import io
import datetime
import email.utils
__author__ = '[email protected]'
__version__ = '1.0.0'
__license__ = 'Python Software Foundation License'
@siayi
siayi / github-wiki-how-to.md
Created October 26, 2020 23:32 — forked from subfuzion/github-wiki-how-to.md
GitHub Wiki How-To

How do I clone a GitHub wiki?

Any GitHub wiki can be cloned by appending wiki.git to the repo url, so the clone url for the repo https://myorg/myrepo/ is: [email protected]:myorg/myrepo.wiki.git (for ssh) or https://github.com/my/myrepo.wiki.git (for https).

You make edits, and commit and push your changes, like any normal repo. This wiki repo is distinct from any clone of the project repo (the repo without wiki.get appended).

How do I add images to a wiki page?

@siayi
siayi / Clone-Github-Wiki-Pages.sh
Created October 26, 2020 23:31 — forked from hanxue/Clone-Github-Wiki-Pages.sh
Cloning Github Wiki Pages
hanxue-mac:Github hanxue$ git clone https://github.com/AppScale/appscale.wiki.git
Cloning into 'appscale.wiki'...
remote: Counting objects: 1745, done.
remote: Compressing objects: 100% (1733/1733), done.
remote: Total 1745 (delta 1089), reused 10 (delta 4)
Receiving objects: 100% (1745/1745), 267.93 KiB | 35.00 KiB/s, done.
Resolving deltas: 100% (1089/1089), done.
Checking connectivity... done
hanxue-mac:Github hanxue$ ls appscale.wiki/
.git/
@siayi
siayi / gh-compare.md
Created October 31, 2018 14:37 — forked from lehnerpat/gh-compare.md
GitHub Compare view

GitHub's compare view is available at:

https://github.com/$USER/$REPO/compare/$REV_A...$REV_B

Naturally, $USER and $REPO are the owner (user/organization) and repository names, respectively.

$REV{A,B} are the two sides of the compare view; they can either be a ref in $USER's repository, i.e. the name of a branch, tag or a commit SHA, or it can be a ref in $OWNER's fork of the repository by using the format $OWNER:$REF.

You can get a diff or patch for the result of the compare view by appending .diff or .patch to the URL, respectively.

@siayi
siayi / argparse.bat
Created August 16, 2018 05:03 — forked from sgryjp/argparse.bat
Command line option (argument) parsing example for Windows batch file.
:: Command line option (argument) parsing example
::
:: Written by Suguru Yamamoto
:: <https://gist.github.com/sgryjp/045989b0f6f0089a24f257d74b8a60bd>
:: LICENSE: Public Domain
@echo off
setlocal enableextensions
:: Parse arguments
set _LEVEL=0
@siayi
siayi / fix_windows.bat
Created August 16, 2018 05:02 — forked from harrisonlingren/fix_windows.bat
A script to fix Windows 10 shit
@rem *** Disable Some Service ***
sc stop DiagTrack
sc stop diagnosticshub.standardcollector.service
sc stop dmwappushservice
sc stop WMPNetworkSvc
sc stop WSearch
sc config DiagTrack start= disabled
sc config diagnosticshub.standardcollector.service start= disabled
sc config dmwappushservice start= disabled