Skip to content

Instantly share code, notes, and snippets.

View gmag11's full-sized avatar

Germán Martín gmag11

View GitHub Profile
@ruanbekker
ruanbekker / promtail_docker_logs.md
Last active April 29, 2024 22:18
Docker Container Logging using Promtail
@superjamie
superjamie / raspberry-pi-vpn-router.md
Last active April 13, 2024 12:22
Raspberry Pi VPN Router

Raspberry Pi VPN Router

This is a quick-and-dirty guide to setting up a Raspberry Pi as a "router on a stick" to PrivateInternetAccess VPN.

Requirements

Install Raspbian Jessie (2016-05-27-raspbian-jessie.img) to your Pi's sdcard.

Use the Raspberry Pi Configuration tool or sudo raspi-config to:

@dropmeaword
dropmeaword / browser_history.md
Last active April 5, 2024 17:37
Playing around with Chrome's history

Browser histories

Unless you are using Safari on OSX, most browsers will have some kind of free plugin that you can use to export the browser's history. So that's probably the easiest way. The harder way, which seems to be what Safari wants is a bit more hacky but it will also work for other browsers. Turns out that most of them, including Safari, have their history saved in some kind of sqlite database file somewhere in your home directory.

The OSX Finder cheats a little bit and doesn't show us all the files that actually exist on our drive. It tries to protect us from ourselves by hiding some system and application-specific files. You can work around this by either using the terminal (my preferred method) or by using the Cmd+Shft+G in Finder.

Finder

Once you locate the file containing the browser's history, copy it to make a backup just in case we screw up.

@jjfajardo
jjfajardo / quicksort.cpp
Created February 2, 2012 19:54
Implementación del algoritmo de ordenación Quicksort en C++.
/*Códigos correspondientes al trabajo realizado para el ISUM 2012.
* Test de rendimiento de los algoritmos de ordenamiento Quicksort,
* Mezcla y burbuja implementados en C++, Fortran y Python.
* Guanajuato, Guanajuato, México (14-16 de Marzo 2012)
*
* Programa: quicksort.cpp
* compilar: gcc -Wall -O quicksort.cpp -o quicksort
* Uso: $./quicksort 1000.dat
* El tamaño del array se toma del nombre del archivo (1000.dat)
* Salida:
@n8henrie
n8henrie / crashplan_setup.sh
Last active March 15, 2024 21:36
Set up CrashPlan on Raspberry Pi (Raspbian Jessie)
#!/bin/bash
#############
# n8henrie's Raspberry Pi CrashPlan installer script
# v0.1.0 :: 20160530
#############
set -e
CP_VERSION="4.8.0"
@ruario
ruario / intro-latest-widevine.md
Last active January 29, 2024 07:53
Fetches the latest Linux Widevine binary so that it can be used by Vivaldi.

With the release of Vivaldi 2.2, this page is now obsolete and unmaintained. Widevine is fetched automatically on post install of our official packages. The information below and the script are left for historical reasons but will not be updated.

If you are using something newer than Vivaldi 2.2, you should not be using this script as there is simply no need. Any need you think you have for it would be a bug IMHO and thus should be logged in a bug report. Before you do so however, you should also checkout the Vivaldi help page on Widevine, on Linux


Summary

A bunch of people asked how they could use this script with pure Chromium on Ubuntu. The following is a quick guide. Though I still suggest you at least try Vivaldi. Who knows, you might like it. Worried about proprietary componants? Remember that libwidevinecdm.so is a b

@vogler
vogler / Artillery-Genius.md
Last active December 27, 2023 12:48
Artillery Genius Config

image

Software

  • Mainboard firmware: Marlin 2.0.9.2 (fork with config, see Marlin/Configuration{,_adv}.h)
    • diff: nvim -d {Marlin,config/Artillery/Genius}/Configuration.h, same for Configuration_adv.h
      • mostly calibration, new extruder and noise-free PWM for parts fan
      • LIN_ADVANCE instead of S_CURVE_ACCELERATION (don't work together)
    • before 13.11.2020: Marlin 2.0.5.3 (3dprintbeginner) (branch)
  • TFT firmware: artillery_tft_fw_1.27.x_patch_9.2 (digant@thingiverse) (TFT-config.ini)
    • Put in Marlin mode (long press, persists on reboot) when printing with OctoPrint because TFT shares serial connection.
@hardillb
hardillb / show-creds.js
Created February 16, 2021 23:18
Quick script to decrypt Node-RED credentials files
const crypto = require('crypto');
var encryptionAlgorithm = "aes-256-ctr";
function decryptCreds(key, cipher) {
var flows = cipher["$"];
var initVector = Buffer.from(flows.substring(0, 32),'hex');
flows = flows.substring(32);
var decipher = crypto.createDecipheriv(encryptionAlgorithm, key, initVector);
var decrypted = decipher.update(flows, 'base64', 'utf8') + decipher.final('utf8');
@sticilface
sticilface / PROGMEM.md
Last active July 23, 2023 11:38
PROGMEM

Guide to PROGMEM on ESP8266 and Arduino IDE

Intro

On low memory devices like the arduino and esp8266 you do not want strings to be stored in RAM. This occurs by default on these systems. Declare a string const char * xyz = "this is a string" and it will use up RAM.

The solution on these devices is to allow strings to be stored in read only memory, in Arduino this is the PROGMEM macro. Most of my experience is with the ESP8266 which is a 32bit micros controller. This device stores PROGMEM data in flash. The macro PROGMEM on ESP8266 is simply

#define PROGMEM   ICACHE_RODATA_ATTR
@jcarolinares
jcarolinares / useful_commands_to_use_in_shell.md
Last active February 3, 2023 02:23
This is a simple guide for non-pro bash users to do random but annoying tasks in just seconds

Useful commands to use in Shell or others:

This is a simple guide for non-pro bash users to do random but annoying tasks in just seconds

Your boss will be happy and you'll be less stressed ;)

Files

Search a file name using a string: