Skip to content

Instantly share code, notes, and snippets.

View oprietop's full-sized avatar
🤘
Forking

Oscar Prieto oprietop

🤘
Forking
  • NERV
  • Court Of The Crimson King
View GitHub Profile
@oprietop
oprietop / fire2keep.py
Created December 20, 2023 10:10
Format firefox exported passwords for Keepass
import datetime
def epoch2date(e):
return datetime.datetime.fromtimestamp(int(e)/1000).strftime('%Y/%m/%d %H:%M:%S')
file1 = open('logins.csv', 'r')
lines = file1.readlines()
if lines:
print('"url","username","password","formActionOrigin","guid","timeCreated","timeLastUsed","timePasswordChanged"')
for line in lines[1:]:
@oprietop
oprietop / windows_activation.md
Created October 25, 2023 16:01 — forked from butageek/windows_activation.md
Activate Windows for free

For Windows 10

Step 1 - Open PowerShell or Command Prompt as administrator

Step 2 - Install KMS client key

slmgr /ipk your_license_key

Replace your_license_key with following volumn license keys according to Windows Edition:

@oprietop
oprietop / update-zfs.sh
Created July 25, 2023 06:37 — forked from corrupt/update-zfs.sh
Bash helper script to update zfs-linux and zfs-utils on arch linux from the arch-zfs repo. I use it whenever the kernel revision in arch's official repos is ahead of arch-zfs. This script will pull a matching kernel version from archive.archlinux.org.
#!/bin/bash
##
#
# update-zfs.sh
#
# simple ZFS update script for arch linux
#
# will update zfs-linux and zfs-utils to their latest versions in the arch-zfs repo
# will retrieve mathching kernel packages from the arch linux package archive, even
@oprietop
oprietop / create-compose.sh
Created January 15, 2023 11:35
Create a docker-compose file extending all directories not beginning with _
#!/bin/sh
# Create a docker-compose file extending all directories not beginning with _
FILE=docker-compose.yml
echo 'version: "3"' > ${FILE}
echo 'services:' >> ${FILE}
for ITEM in *; do
if [ -d "${ITEM}" ]; then
@oprietop
oprietop / docker-compose.yml
Created December 7, 2022 10:55
meta compose file for various services
version: '3.8'
services:
influxdb:
image: influxdb:1.8
ports:
- 8086:8086
volumes:
- ./influxdb/data:/var/lib/influxdb
environment:
TZ: Europe/Madrid
@oprietop
oprietop / post.html
Created December 4, 2022 09:38
async fetch example
<!DOCTYPE html
<html>
<head>
<meta charset="utf-8">
<title>ASD</title>
<script>
async function test() {
let url = 'http://jenkins/8080/job/dummy_job/buildWithParameters';
let username = 'XXXXXX'
let token = 'XXXXXX'
@oprietop
oprietop / template.go
Last active October 15, 2023 21:01
golang snippet template using structs, goroutines with limited paralellism, http requests, json unmarshall, safe access to variables
package main
import (
"os"
"fmt"
"time"
"io"
"io/ioutil"
"sync"
"log"
@oprietop
oprietop / Dockerfile
Created April 27, 2022 10:26
Dockefile for carbon-c-relay that passed hadolint check
FROM alpine:3.15 AS builder
COPY . /opt/carbon-c-relay-build
WORKDIR /opt/carbon-c-relay-build
RUN \
apk add --no-cache git=2.34.2-r0 bc=1.07.1-r1 build-base=0.5-r2 curl=7.80.0-r0 automake=1.16.4-r1 autoconf=2.71-r0 libtool=2.4.6-r7 && \
./configure && make
FROM alpine:3.15
@oprietop
oprietop / Dockerfile
Created April 12, 2022 19:17
Old docker-graphite Dockerfile
# Sourced from https://github.com/rvernica/docker-library, thanks!
FROM alpine:3.5
RUN apk add --update-cache \
ca-certificates \
libffi-dev \
py-cairo \
py-pip \
py-twisted \
py-psycopg2 \
@oprietop
oprietop / docker-compose.yml
Last active April 1, 2022 08:59
Compose file to run and test graphiteapp/graphite-statsd
# Links:
# https://hub.docker.com/r/graphiteapp/graphite-statsd/
# https://github.com/kiwigrid/helm-charts/blob/master/charts/graphite/values.yaml
# https://github.com/grobian/carbon-c-relay/blob/master/Dockerfile
#
# Usage:
# git clone https://github.com/grobian/carbon-c-relay.git
# docker-compose up -d
#
# Test: