Skip to content

Instantly share code, notes, and snippets.

View teguhmurdianto's full-sized avatar
💭
Open idea discussion

Teguh Murdianto teguhmurdianto

💭
Open idea discussion
View GitHub Profile
@teguhmurdianto
teguhmurdianto / Dockerfile
Created September 14, 2021 16:42
teguhmurdianto/electron-windows-builder on docker
FROM ubuntu:latest
RUN mkdir -p /project
WORKDIR /project
# without interactive dialogue
ARG DEBIAN_FRONTEND=noninteractive
ENV NODE_VERSION 14.17.6
@teguhmurdianto
teguhmurdianto / GmailAutoArchive.js
Last active February 7, 2021 10:24
Gmail Auto Archive
function archiveAllLabelLimit400(){
gmailArchiveAllLabel(400);
}
function gmailArchiveAllLabel(limit) {
var labels = GmailApp.getUserLabels();
for (var a = 0; a < labels.length; a++) {
var threads = labels[a].getThreads(0, limit);
// Archive all the labelled threads
for (var i = 0; i < threads.length; i++) {
@teguhmurdianto
teguhmurdianto / Startup.cs
Created July 13, 2020 17:56 — forked from domenu/Startup.cs
Snake Case support for Swashbuckle w/ ASP.NET Core 3.0
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
// ...
services.AddControllers().AddJsonOptions(options =>
{
options.JsonSerializerOptions.PropertyNamingPolicy = new SnakeCasePropertyNamingPolicy();
});
@teguhmurdianto
teguhmurdianto / docker-cleanup-resources.md
Created October 22, 2018 04:04 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

SHORTCUTS

Key/Command Description
Tab Auto-complete files and folder names
Ctrl + A Go to the beginning of the line you are currently typing on
Ctrl + E Go to the end of the line you are currently typing on
Ctrl + U Clear the line before the cursor
Ctrl + K Clear the line after the cursor
Ctrl + W Delete the word before the cursor
Ctrl + T Swap the last two characters before the cursor

Introduction

  • C-a == Ctrl-a
  • M-a == Alt-a

General

:q        close
:w        write/saves
:wa[!]    write/save all windows [force]
:wq       write/save and close