Skip to content

Instantly share code, notes, and snippets.

@esperlu
esperlu / mysql2sqlite.sh
Created April 27, 2011 05:46
MySQL to Sqlite converter
#!/bin/sh
# Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the
# CREATE block and create them in separate commands _after_ all the INSERTs.
# Awk is choosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk.
# The mysqldump file is traversed only once.
# Usage: $ ./mysql2sqlite mysqldump-opts db-name | sqlite3 database.sqlite
# Example: $ ./mysql2sqlite --no-data -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite
@evildmp
evildmp / gist:3094281
Last active June 30, 2023 10:55
Set up Django, nginx and uwsgi

This document has now been incorporated into the uWSGI documentation:

http://uwsgi-docs.readthedocs.org/en/latest/tutorials/Django_and_nginx.html

Set up Django, nginx and uwsgi

Steps with explanations to set up a server using:

@protrolium
protrolium / ffmpeg.md
Last active April 8, 2024 11:49
ffmpeg guide

ffmpeg

Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

You can get the list of installed codecs with:

@gdamjan
gdamjan / arch-mirror.service
Last active December 4, 2023 11:08
script to rsync from an arch mirror
[Unit]
Description=Mirror arch linux
[Service]
Type=oneshot
ExecStart=/usr/local/bin/sync_arch_mirror.sh
User=arch
IPAccounting=yes
NoNewPrivileges=yes
PrivateTmp=yes
@sebastiencs
sebastiencs / volume.sh
Last active February 13, 2024 11:19
Script to get volume notification with dunst http://imgur.com/a/qWgAw
#!/bin/bash
# You can call this script like this:
# $./volume.sh up
# $./volume.sh down
# $./volume.sh mute
function get_volume {
amixer get Master | grep '%' | head -n 1 | cut -d '[' -f 2 | cut -d '%' -f 1
}
@Blaradox
Blaradox / brightnessControl.sh
Created September 23, 2018 03:47
Notifications for brightness and volume, using dunstify
#!/usr/bin/env bash
# You can call this script like this:
# $ ./brightnessControl.sh up
# $ ./brightnessControl.sh down
# Script inspired by these wonderful people:
# https://github.com/dastorm/volume-notification-dunst/blob/master/volume.sh
# https://gist.github.com/sebastiencs/5d7227f388d93374cebdf72e783fbd6a
@flatz
flatz / remote_pkg_installer.txt
Last active January 30, 2024 04:21
Instructions for Remote Package Installer
Remote Package Installer
Package link: https://mega.nz/#!2dN1XajB!Z5fXyFoKOXFI_ujgGoCZfFFy5nyn7OWo6vF6h_HmWhQ
Requirements:
Any exploit on 4.5x+
HEN 1.8 (you could get it from zecoxao's page) or any other kernel payload (it just need to have fPKG stuff and /data mount patches for ShellCore that I've posted recently)
Changelog:
[+] Added CORS header to interact with browser's AJAX
@pierew
pierew / pvenode-rename
Created February 18, 2019 19:07
Changing a Proxmox VE Nodes name when it is not in a cluster
OLDNAME=$(hostname)
hostnamectl set-hostname ${1}
mkdir -p /etc/pve/nodes/${1}
cp -a /etc/pve/nodes/${OLDNAME} /etc/pve/nodes/${1}
echo 'A reboot is required, Exit with CTRL-C'
read
@zed-dz
zed-dz / offline_mdn_docs.md
Created March 12, 2019 14:01
Offline MDN Docs
@stdevPavelmc
stdevPavelmc / Cell_Modem_3G_es.md
Last active October 21, 2022 23:41
Usa tu celular android como un modem 3G/4G y ahorra datos móviles

Como usar tu celular Android como modem para 3G/4G y ahorrar datos

This tutorial has an english version

Porque?

Quizás tu usas un proveedor de telefonía que tiene entre sus ofertas una tarifa plana, o una bien generosa y que te alcanza, pero en Cuba no existe tarifa plana y tendemos a exprimir cada byte de la conexión de datos.

Puede que te hayas topado con este caso: usas los datos móviles del celular compartidos por WiFi con la PC/Laptop de trabajo y no hay nada malo con eso, o si?