Skip to content

Instantly share code, notes, and snippets.

@alexwybraniec
alexwybraniec / gist:2972487
Created June 22, 2012 12:32
Enabling Memcached graphing in Munin, Ubuntu 10.04 LTS, with munin-node already installed
sudo apt-get update
sudo apt-get install munin-plugins-extra
cd /etc/munin/plugins
sudo ln -snf /usr/share/munin/plugins/memcached_ memcached_bytes
sudo ln -snf /usr/share/munin/plugins/memcached_ memcached_counters
sudo ln -snf /usr/share/munin/plugins/memcached_ memcached_rates
sudo aptitude install libcache-memcached-perl
sudo /etc/init.d/munin-node restart
sudo tail -f /var/log/munin/munin-node.log
@zach-klippenstein
zach-klippenstein / ChangePassword.java
Last active April 3, 2024 18:04
The keystore password on Java keystore files is utterly pointless. You can reset it without knowing it, as shown by this code. Note that private keys are still secure, as far as I know. The JKS implementation is copyright Casey Marshall (rsdio@metastatic.org), and the original source is available at http://metastatic.org/source/JKS.java. I've in…
import java.util.*;
import java.io.*;
import java.security.*;
public class ChangePassword
{
private final static JKS j = new JKS();
public static void main(String[] args) throws Exception
{
@barryo
barryo / dovecot-10-auth.conf
Last active October 24, 2023 14:29
Configuration Files for ViMbAdmin on Ubuntu 13.10 with Dovecot and Postfix - referenced from https://github.com/opensolutions/ViMbAdmin3/wiki/Mail-System-Install-on-Ubuntu
auth_mechanisms = plain login
!include auth-sql.conf.ext
@joepie91
joepie91 / vpn.md
Last active May 3, 2024 10:58
Don't use VPN services.

Don't use VPN services.

No, seriously, don't. You're probably reading this because you've asked what VPN service to use, and this is the answer.

Note: The content in this post does not apply to using VPN for their intended purpose; that is, as a virtual private (internal) network. It only applies to using it as a glorified proxy, which is what every third-party "VPN provider" does.

  • A Russian translation of this article can be found here, contributed by Timur Demin.
  • A Turkish translation can be found here, contributed by agyild.
  • There's also this article about VPN services, which is honestly better written (and has more cat pictures!) than my article.
@chmodx
chmodx / dockerGUI
Last active September 12, 2023 08:51
Using GUI's with Docker
docker pull kalilinux/kali-linux-docker
# Available metapackages for Kali Linux (apt-get update && apt-cache search kali-linux)
# To see the list of tools included in a metapackage (apt-cache show kali-linux-web |grep Depends)
xhost +local:`docker inspect --format='{{ .Config.Hostname }}' $containerId`
docker run -ti --rm -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v /home/bauta/Downloads:/bt kalilinux maltego
#!/bin/bash
echo -n Password:
read -s password
echo
hash="$(echo -n $password | openssl sha1)"
upperCase="$(echo $hash | tr '[a-z]' '[A-Z]')"
prefix="${upperCase:0:5}"
response=$(curl -s https://api.pwnedpasswords.com/range/$prefix)
while read -r line; do
@slawo-ch
slawo-ch / split.awk
Last active April 6, 2024 16:41
split mysql dump to csv's
BEGIN {
# file starts with DDL statements that go into header.sql
table = "header";
sql = 1
}
{
# -- step 1 --
# determine whether current line contains a DDL sql statement or
@bahorn
bahorn / sign.py
Last active October 27, 2023 15:07
Implementation of the Tuya API signing.
import requests
import hashlib
import time
import uuid
import os
import copy
import json
# This is based on my personal implementation but stripped down to only what is
# needed to verify it.
@bahorn
bahorn / tuya_cloud.py
Created January 31, 2018 20:36
Cloud endpoint
import requests
import hashlib
import time
import uuid
import os
import copy
import json
# Fixed up version of my previous code to work with the Cloud endpoints.
# Hopefully this works.
#!/bin/bash
# Usage:./grant_ios_permissions.sh [bundleId]
# Example: ./grant_ios_permissions.sh com.spotify.client
echo "This does not grant location, notification or local network permission. You can grant location permission with this script https://gist.github.com/kasnder/91a64a555e962d08cd05b52f7114b897 and the notifications permission with this script https://gist.github.com/kasnder/c17752607486042fc4f8bd4f61bb2c43 and local network permission with this script https://gist.github.com/kasnder/7076fe8eaea51948e5cda7a01e343ff5"
# Requirements:
# - iOS 14.8 device with checkra1n jailbreak
# - Installed `sqlite3` on iOS device from Cydia