Skip to content

Instantly share code, notes, and snippets.

@ifooth
ifooth / loki.yaml
Created April 1, 2021 07:52
loki.yaml
auth_enabled: false
server:
http_listen_port: 3100
grpc_listen_port: 9096
frontend:
compress_responses: true
query_range:
@ifooth
ifooth / log-analyze.py
Created March 28, 2021 11:55
log-analyze.py
# -*- coding: utf-8 -*-
import sys
import hashlib
def read_log(path):
with open(path, "rb") as fh:
data = fh.read()
return data.splitlines()
@ifooth
ifooth / tcp-forw.go
Last active December 13, 2021 02:12
tcp-forw.go
package main
import (
"flag"
"fmt"
"io"
"log"
"net"
"os"
"sync"
@ifooth
ifooth / LICENCE SUBLIME TEXT
Created May 25, 2019 15:50
Sublime Text 3 Serial key build is 3176
## Sublime Text 3 Serial key build is 3176
> * Added these lines into /etc/hosts
127.0.0.1 www.sublimetext.com
127.0.0.1 license.sublimehq.com
> * Used the license key
----- BEGIN LICENSE -----
@ifooth
ifooth / screen-docker-for-mac.sh
Created December 14, 2017 06:35 — forked from BretFisher/docker-for-mac.md
Screen Commands for Docker for Mac (prevent garbled text on reconnect)
# connect to tty on Docker for Mac VM
screen ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/tty
# disconnect that session but leave it open in background
Ctrl-a d
# list that session that's still running in background
screen -ls
# reconnect to that session (don't open a new one, that won't work and 2nd tty will give you garbled screen)
@ifooth
ifooth / Sublime Text 3 Build 3103 License Key - CRACK
Created September 23, 2016 15:33
Sublime Text 3 Build 3103 License Key - CRACK
I use the first
—– BEGIN LICENSE —–
Michael Barnes
Single User License
EA7E-821385
8A353C41 872A0D5C DF9B2950 AFF6F667
C458EA6D 8EA3C286 98D1D650 131A97AB
AA919AEC EF20E143 B361B1E7 4C8B7F04
deb http://mirrors.sohu.com/ubuntu/ precise main restricted
deb-src http://mirrors.sohu.com/ubuntu/ precise main restricted
deb http://mirrors.sohu.com/ubuntu/ precise-updates main restricted
deb-src http://mirrors.sohu.com/ubuntu/ precise-updates main restricted
deb http://mirrors.sohu.com/ubuntu/ precise universe
deb-src http://mirrors.sohu.com/ubuntu/ precise universe
deb http://mirrors.sohu.com/ubuntu/ precise-updates universe
deb-src http://mirrors.sohu.com/ubuntu/ precise-updates universe
deb http://mirrors.sohu.com/ubuntu/ precise multiverse
deb-src http://mirrors.sohu.com/ubuntu/ precise multiverse
#!/bin/bash
build=/tmp/nginx-build/
nginx=nginx-1.4.2
dav_ext=nginx-dav-ext-module
pam_auth=ngx_http_auth_pam_module-1.2
index=ngx-fancyindex
@ifooth
ifooth / gitolite
Last active December 19, 2015 10:19
#/bin/bash
useradd -m -U git
echo git:git | chpasswd
su git
ssh-keygen -C git@ifooth.com
git clone git://github.com/sitaramc/gitolite
mkdir -p $HOME/bin