Skip to content

Instantly share code, notes, and snippets.

@pretzelhands
pretzelhands / index.php
Created June 2, 2021 13:31
Forbidden Prototype Template
<?php
// Your PHP code here
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
@xialu4820723
xialu4820723 / bash_util.sh
Last active April 25, 2023 14:46
util snippet
# csv sort and remove column
sort -h --field-separator=',' 374160.csv | cut -d, -f6 --complement | less
# shell print for download csv file
sort -h --field-separator=',' 1532881.csv | cut -d, -f6 --complement | perl -pe 's/((?<=,)|(?<=^)),/ ,/g;' | column -t -s, | less -S
# run funtion in remote machine
ssh ${machine} "$(typeset -f function_name); function_name"
# kill process
@Tabea-K
Tabea-K / bash_cheatsheet.md
Last active July 9, 2020 08:14
BASH commands
author date title
Tabea Kischka
2018-06-26
BASH Cheatsheet

BASH Cheatsheet

check for file on remote

# to list files that already exist on the server
@steven2358
steven2358 / ffmpeg.md
Last active July 25, 2024 14:53
FFmpeg cheat sheet
@golonzovsky
golonzovsky / kafka_commands.md
Last active May 20, 2021 07:14
useful Kafka commands

TODO

  • kafkacat commands

some useful comands

start cluster locally with port forward or host network

docker run -d --name=landoop -p 127.0.0.1:8081-8083:8081-8083 -p 127.0.0.1:9581-9585:9581-9585 -p 127.0.0.1:9092:9092 -p 127.0.0.1:3030:3030 -p 127.0.0.1:2181:2181 -e ADV_HOST=127.0.0.1 landoop/fast-data-dev

@johanvergeer
johanvergeer / ExportTableHeaders.p
Created December 6, 2017 11:01
Progress OpenEdge Export column names
/*------------------------------------------------------------------------
File : Export table headers
Purpose : Gist for exporting table headers in Progress OpenEdge
Description :
Author(s) : Johan Vergeer. With thanks to TheDropper at
https://stackoverflow.com/questions/44204335/how-to-add-column-name-while-export-csv-in-progress-4gl#44205839
Created : 6 december 2017
----------------------------------------------------------------------*/
DEF VAR hTable AS HANDLE NO-UNDO.
@jsbonso
jsbonso / Java Fibonacci Sequence.java
Last active December 16, 2017 17:20
Java Fibonacci Sequence
/**
* Calculates the next fibonacci sequence.
*
* To properly implement a Fibonacci sequence,
* we need to know the Mathematical formula first, and that is:
*
* F<sub>n</sub> = F<sub>n-1</sub> + F<sub>n-2</sub>
*
* The above formula basically reads as this:
* The next sequence (Fn) is the sum of the
@olih
olih / jq-cheetsheet.md
Last active July 16, 2024 23:02
jq Cheet Sheet

Processing JSON using jq

jq is useful to slice, filter, map and transform structured json data.

Installing jq

On Mac OS

brew install jq