Skip to content

Instantly share code, notes, and snippets.

@suntong
suntong / nfpm.yaml
Last active December 9, 2021 17:15
# Name. (required)
name: foo
# Architecture. (required)
# This will expand any env var you set in the field, eg version: ${GOARCH}
# The architecture is specified using Go nomenclature (GOARCH) and translated
# to the platform specific equivalent. In order to manually set the architecture
# to a platform specific value, use deb_arch, rpm_arch and apk_arch.
arch: amd64
@suntong
suntong / nfpm.sh
Last active December 9, 2021 04:00
#!/bin/sh
set -e
# Code generated by godownloader on 2019-12-25T12:47:14Z. DO NOT EDIT.
#
usage() {
this=$1
cat <<EOF
$this: download go binaries for goreleaser/nfpm
@suntong
suntong / x
Created November 14, 2021 01:53
x
####################################################
# This is the configuration file for localepurge(8).
####################################################
####################################################
# Uncommenting this string enables the use of dpkg's
# --path-exclude feature. In this mode, localepurge
# will configure dpkg to exclude the desired locales
# at unpack time.
#
@suntong
suntong / test.md
Last active November 8, 2021 15:02

test.mdtest2

grml2usb --verbose --mbr-menu grml64-full_2021.07.iso /dev/sdb3
2021-10-16 17:06:48,429 Executing grml2usb version 0.18.3
2021-10-16 17:06:48,430 Checking for boot flag
2021-10-16 17:06:48,588 boot flag is enabled on /dev/sdb3
2021-10-16 17:06:48,771 Using ISO grml64-full_2021.07.iso
2021-10-16 17:06:48,772 mount ['-o', 'loop,ro', '-t', 'iso9660'] /mnt/d/Arch/linux/grml64-full_2021.07.iso /tmp/grml2usbnk1kskoc
2021-10-16 17:06:48,797 register_mountpoint(/tmp/grml2usbnk1kskoc)
2021-10-16 17:06:48,798 mount ['-o', 'utf8,iocharset=iso8859-1'] /dev/sdb3 /tmp/grml2usbgmn859jd
2021-10-16 17:06:48,985 register_mountpoint(/tmp/grml2usbgmn859jd)
{
"data": {
"search": {
"repositoryCount": 76,
"edges": [
{
"node": {
"name": "adbc",
"url": "https://github.com/suntong/adbc",
"description": "adbc - Ant Design BizCharts",
USE [master]
GO
/****** Object: Database [AdventureWorksLT2017] Script Date: 8/11/2021 10:48:24 PM ******/
CREATE DATABASE [AdventureWorksLT2017]
CONTAINMENT = NONE
ON PRIMARY
( NAME = N'AdventureWorksLT2012_Data', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL14.SQLEXPRESS\MSSQL\DATA\AdventureWorksLT2012.mdf' , SIZE = 22464KB , MAXSIZE = UNLIMITED, FILEGROWTH = 16384KB )
LOG ON
( NAME = N'AdventureWorksLT2012_Log', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL14.SQLEXPRESS\MSSQL\DATA\AdventureWorksLT2012_log.ldf' , SIZE = 2048KB , MAXSIZE = UNLIMITED, FILEGROWTH = 10%)
GO
@suntong
suntong / Sql.rl
Created August 7, 2021 16:14 — forked from umjasnik/Sql.rl
simple SQL parser using ragel - get all tables that are referenced in a SQL statement
package de.uwefleischer.statemachines;
import java.util.Set;
import java.util.TreeSet;
public class Sql {
private static Set<String> tables;
%%{