Skip to content

Instantly share code, notes, and snippets.

View lartie's full-sized avatar
👀
looking for a interesting startups

Artemy lartie

👀
looking for a interesting startups
View GitHub Profile
@lartie
lartie / csvkit-eg.md
Created December 24, 2023 14:26 — forked from swayson/csvkit-eg.md
CSVKit Examples

1. Ditch Excel (for real)

    in2csv file1.xls > file1.csv

2. Conquer fixed-width formats

    in2csv -f fixed -s schema.csv data.fixed > data.csv

3. Find cells matching a regular expression

csvgrep -c phone_number -r "\d{3}-123-\d{4}" data.csv > matching.csv

@lartie
lartie / syncmap.go
Created July 18, 2023 09:44
SyncMap With Generict
package sync
import "sync"
type Map[K, V any] struct {
s sync.Map
}
func NewMap[K, V any]() Map[K, V] {
return Map[K, V]{
func whoisnext() {
if ! command -v shuf &> /dev/null; then
brew install coreutils
fi
if ! command -v cowsay &> /dev/null; then
brew install cowsay
fi
if ! command -v lolcat &> /dev/null; then
-----------------------------------
/ \
| |
| SYN seq (n) |
| ----------------------------------> |
| |
| |
| |
| SYN seq (m) ack (n+1) |
| <---------------------------------- |
@lartie
lartie / Dockerfile
Created May 25, 2020 10:04
golang-docker-dev
FROM golang:alpine
ARG tz=Europe/Moscow
ARG repository=/go/src/app
ENV TZ=$tz
ENV REPOSITORY_PATH=$repository
RUN apk update && apk add --update \
alpine-sdk \
@lartie
lartie / postgres_queries_and_commands.sql
Created September 2, 2019 19:48 — forked from rgreenjr/postgres_queries_and_commands.sql
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
@lartie
lartie / setup-jasminsms-docker.md
Created April 3, 2018 09:01 — forked from renatoagomes/setup-jasminsms-docker.md
Setup JasminSMS com Docker localmente
@lartie
lartie / README.md
Created February 23, 2018 22:00 — forked from magnetikonline/README.md
Install Parallels version 10/11/12/13 tools on Ubuntu server guest.

Install OSX Parallels version 10/11/12/13 tools on Ubuntu server guest

Have tested these instructions successfully under Ubuntu 16.04LTS and 14.04LTS.

  • Create Ubuntu server instance under Parallels (obviously).
  • Start VM, goto Actions - Install Parallels Tools... to mount the ISO image.
    • Note: if this fails, or updating tools for an existing guest you can do the following:
    • Goto Devices > CD/DVD 1 > Connect Image....
    • Select the following ISO image: /Applications/Parallels Desktop/Contents/Resources/Tools/prl-tools-lin.iso.
    • This will mount the tools CD image.
  • From the terminal, run the following commands: