Skip to content

Instantly share code, notes, and snippets.

View srkiNZ84's full-sized avatar

Srđan (Serge) Đukić srkiNZ84

View GitHub Profile
@matthewdowney
matthewdowney / hack-captive-portal.bb
Created January 5, 2023 18:39
Script to bypass captive portals from https://miloserdov.org/?p=1088, ported to Babashka and improved
#!/usr/bin/env bb
; =========================================================================== ;
; FILE: hack-captive-portal.bb ;
; USAGE: sudo bb hack-captive-portal.bb ;
; ;
; DESCRIPTION: This script helps to pass through the captive portals in ;
; public Wi-Fi networks. It hijacks IP and MAC from somebody ;
; who is already connected and authorized on captive portal. ;
; Tested in Ubuntu 16.04 with different captive portals in ;
; airports and hotels all over the world. ;
@mcmoe
mcmoe / java-keytool.md
Last active February 15, 2024 08:24
Creating a keystore and truststore using the Java keytool plus useful check and modification keytool commands

Creating a keystore and exporting its certificate into a new truststore

Create the Keystore and generate a certificate, an example is shown below:

keytool -genkey -alias client -keyalg RSA -keystore client.jks -keysize 2048

Export a certificate from a Keystore:

keytool -export -alias client -file client.crt -keystore client.jks

Import the certificate to a Truststore:

keytool -import -v -trustcacerts -alias client -file client.crt -keystore clienttrust.jks

In a terminal start a server.

$ python -m SimpleHTTPServer 8000

In another terminal set up the cgroups freezer.

@thoughtfulbloke
thoughtfulbloke / HES_family.R
Created June 11, 2018 10:30
Family groups and income deciles from NZ HES
HES9 <- read.csv("household-income-and-houseing-statistics-ye-june2-17-csv-tables-corrected/HES2017-Table9.csv",
stringsAsFactors = FALSE)
library(dplyr)
library(tidyr)
library(purrr)
library(ggplot2)
library(ggbeeswarm)
library(ggthemes)
atomise <- function(df) {
kubectl get pods | grep Evicted | awk '{print $1}' | xargs kubectl delete pod
@raouldc
raouldc / commit-msg
Last active October 20, 2022 07:02 — forked from williamdenton/commit-msg
Git hooks
#!/bin/sh
commit_regex='(([[:upper:]]*\-[0-9]*)|fixup!)'
error_msg="Aborting commit. Your commit message is missing a JIRA ticket"
if ! grep -iqE "$commit_regex" "$1";
then
echo "$error_msg" >&2
exit 1
@jonhoo
jonhoo / README.md
Last active July 19, 2021 10:49
Distributed RWMutex in Go

How to put a GNU/Linux installation on your Chromebook

DISCLAIMER: This could all quite plausibly brick your Chromebook, and I take no responsibility for any damage you might inflict on it or yourself. Follow along at your own risk.

Most Chromebooks can run some flavour of GNU/Linux using the Chrubuntu method, running off the kernel that comes with ChromeOS. I found, however, that the ChromeOS kernel didn’t play well with recent X.org versions, and would refuse to recover from suspend, and not deal very well at all with having an external screen attached to it.

I also wanted to replace ChromeOS entirely with Arch on my Chromebook, because only 16 gigabytes of eMMC isn’t very convenient for dual booting. To accomplish this, I needed an external installation medium.

First of all, you’ll need to get your Chromebook into developer mode if you haven’t already. This is model specific, although for most recent models holding the Escape and Reload keys while booting should do the trick. If not, ask Google.

@rain1024
rain1024 / tut.md
Last active May 6, 2024 06:12
Install pdflatex ubuntu

PdfLatex is a tool that converts Latex sources into PDF. This is specifically very important for researchers, as they use it to publish their findings. It could be installed very easily using Linux terminal, though this seems an annoying task on Windows. Installation commands are given below.

  • Install the TexLive base
sudo apt-get install texlive-latex-base
  • Also install the recommended and extra fonts to avoid running into the error [1], when trying to use pdflatex on latex files with more fonts.
@tristanfisher
tristanfisher / Ansible-Vault how-to.md
Last active April 3, 2024 13:55
A short tutorial on how to use Vault in your Ansible workflow. Ansible-vault allows you to more safely store sensitive information in a source code repository or on disk.

Working with ansible-vault


I've been using a lot of Ansible lately and while almost everything has been great, finding a clean way to implement ansible-vault wasn't immediately apparent.

What I decided on was the following: put your secret information into a vars file, reference that vars file from your task, and encrypt the whole vars file using ansible-vault encrypt.

Let's use an example: You're writing an Ansible role and want to encrypt the spoiler for the movie Aliens.