Skip to content

Instantly share code, notes, and snippets.

  • Use curl to get the JSON response for the latest release
  • Use grep to find the line containing file URL
  • Use cut and tr to extract the URL
  • Use wget to download it
curl -s https://api.github.com/repos/jgm/pandoc/releases/latest \
| grep "browser_download_url.*deb" \
| cut -d : -f 2,3 \
| tr -d \" \
@wukuan405
wukuan405 / Auto-refresh bookmarklet
Created April 8, 2022 00:19 — forked from eculver/Auto-refresh bookmarklet
Auto-refresh bookmarklet
// origin: http://www.google.com/support/forum/p/Chrome/thread?tid=1a37ccbdde5902fd&hl=en
javascript:
timeout=prompt("Set timeout [s]");
current=location.href;
if(timeout>0)
setTimeout('reload()',1000*timeout);
else
location.replace(current);
function reload(){
@wukuan405
wukuan405 / freee-exchange-rate.user.js
Created March 18, 2020 02:51 — forked from baramon/freee-exchange-rate.user.js
Freeeの経費精算に為替換算機能を追加(インストール方法はこのページの一番下を参照 / The installation instruction is at the foot of the page)
// ==UserScript==
// @name freee Echange Rate Converter
// @namespace http://takram.com/
// @version 2018.09.14
// @match https://secure.freee.co.jp/expense_applications_v2
// @match https://secure.freee.co.jp/expense_applications_v2/*
// @grant GM_xmlhttpRequest
// @require https://unpkg.com/vue
// ==/UserScript==
@wukuan405
wukuan405 / README.md
Created July 4, 2019 02:30 — forked from hugolpz/README.md
Minimal HandlebarsJS Demo

Handlebars.js is a convenient, easy to learn JS templating system. In this page, we will cover the basics of Handlebars.js.

What is Handlebars.js ?

Mustache.js HTML templates system have been designed to stays extremly simple, on purpose restricted to structure only (logic-less templating). As such, it excludes logical operators (IF) and alikes.

Handlebars.js HTML templates are based on Mustache.js, so you can start little and simple. Handlebars.js also have logical and advanced operators so you can later build more complex and conditional stuffs. In this 2nd logic-full level, the HTML-CSS designer of the template will need some basic coding concepts, such FOR LOOPS, IF (conditional), and few others fundamentals. The documentations will there be about 3 A4 pages long.

Why use JS templating ?

@wukuan405
wukuan405 / PDFCreator_EmailAllResponses
Created January 26, 2019 09:34 — forked from andrewroberts/PDFCreator_EmailAllResponses
Google Apps Script to create a PDF from each of the rows in a Google Sheet
/*
PDF Creator - Email all responses
=================================
When you click "Create PDF > Create a PDF for each row" this script
constructs a PDF for each row in the attached GSheet. The value in the
"File Name" column is used to name the file and - if there is a
value - it is emailed to the recipient in the "Email" column.
@wukuan405
wukuan405 / mime.sh
Created September 13, 2018 12:13 — forked from markusfisch/mime.sh
bash functions to dump and inspect a message in MIME format
#!/usr/bin/env bash
##############################################################################
#### MIME interface
##############################################################################
# Parse message in MIME format and create a temporary cache directory
mime_parse()
{
MIME_CACHE=${MIME_CACHE:-`mktemp -d ${BIN}.XXXXXXXXXX`}
@wukuan405
wukuan405 / Makefile
Created August 18, 2018 01:53 — forked from mpneuried/Makefile
Simple Makefile to build, run, tag and publish a docker containier to AWS-ECR
# import config.
# You can change the default config with `make cnf="config_special.env" build`
cnf ?= config.env
include $(cnf)
export $(shell sed 's/=.*//' $(cnf))
# import deploy config
# You can change the default deploy config with `make cnf="deploy_special.env" release`
dpl ?= deploy.env
include $(dpl)
@wukuan405
wukuan405 / bash-cheatsheet.sh
Created June 12, 2017 01:07 — forked from LeCoupa/bash-cheatsheet.sh
Bash CheatSheet for UNIX Systems
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04
@wukuan405
wukuan405 / README.md
Created July 15, 2016 00:05 — forked from oodavid/README.md
Deploy your site with git

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/