Skip to content

Instantly share code, notes, and snippets.

--- a/lib/dockerSemanticTokens.js
+++ b/lib/dockerSemanticTokens.js
@@ -252,6 +252,8 @@
var onbuild = instruction;
this.createTokensForInstruction(onbuild.getTriggerInstruction());
return;
+ case dockerfile_ast_1.Keyword.RUN:
+ return;
}
this.createArgumentTokens(instruction, args);
@waltarix
waltarix / ash_profile
Last active July 7, 2019 00:59
ash profile for Alpine Linux Docker image
# vim: ft=sh
# docker run --rm -it -v =(curl -s https://gist.githubusercontent.com/waltarix/f1d2046dc93ec61721bcd2cacd7d48f8/raw/af8fd9cbfb40bf79d0113f3a436c9e57d01a0a4b/ash_profile):/etc/profile alpine:3.9 ash -l
# or
# docker run --rm -it -v =(curl -s https://git.io/fjity):/etc/profile alpine:3.9 ash -l
export CHARSET=UTF-8
export PAGER=less
cat <<ZONE | base64 -d | gzip -d > /etc/localtime
@waltarix
waltarix / wcwidth9.h
Last active March 19, 2020 08:12
custom wcwidth9.h
#ifndef WCWIDTH9_H
#define WCWIDTH9_H
#include <stdlib.h>
#include <stdbool.h>
struct wcwidth9_interval {
long first;
long last;
};
@waltarix
waltarix / migemo.c
Created March 4, 2017 05:40
migemo function for sqlite3
/*
* Written by Alexey Tourbin <at@altlinux.org>.
*
* The author has dedicated the code to the public domain. Anyone is free
* to copy, modify, publish, use, compile, sell, or distribute the original
* code, either in source code form or as a compiled binary, for any purpose,
* commercial or non-commercial, and by any means.
*/
#include <assert.h>
#include <stdlib.h>
@waltarix
waltarix / pandoc-fix-textile-writer-for-redmine.patch
Created October 13, 2016 12:44
pandoc: Fix textile writer for Redmine.
diff --git a/src/Text/Pandoc/Writers/Textile.hs b/src/Text/Pandoc/Writers/Textile.hs
index 98f9157..8e086e1 100644
--- a/src/Text/Pandoc/Writers/Textile.hs
+++ b/src/Text/Pandoc/Writers/Textile.hs
@@ -40,13 +40,13 @@ import Text.Pandoc.Templates (renderTemplate')
import Text.Pandoc.XML ( escapeStringForXML )
import Data.List ( intercalate )
import Control.Monad.State
-import Data.Char ( isSpace )
@waltarix
waltarix / peco_select_history
Last active August 29, 2015 14:16
peco_select_history for zsh
# vim:ft=zsh
whence peco &>/dev/null && function {
function peco_select_history {
emulate -L zsh
local delimiter=$'\0; \0' newline=$'\n'
BUFFER=${"$(print -rl ${history//$newline/$delimiter} | peco --query "$LBUFFER")"//$delimiter/$newline}
CURSOR=$#BUFFER
@waltarix
waltarix / ssssss.txt
Created March 27, 2013 15:17
ssssssss....
                
                
                
              
@waltarix
waltarix / runemacs.bat
Created February 25, 2013 10:59
emacs launcher for windows
@ECHO OFF
SET HOME=%~dp0
START /B %HOME%/bin/runemacs.exe
@waltarix
waltarix / nacci.php
Created February 25, 2013 06:53
Fibo, Tribo and Tetra nacci number, Lucas number in PHP
<?php
const CALC_LIMIT = 1000;
// fibo
var_dump(implode(', ', nacci(CALC_LIMIT, [0, 1])));
// tribo
var_dump(implode(', ', nacci(CALC_LIMIT, [0, 0, 1])));