Skip to content

Instantly share code, notes, and snippets.

View pwqw's full-sized avatar
🍒
Rompiendo las guindas

Pin \\ pwqw

🍒
Rompiendo las guindas
View GitHub Profile
@mattlev2
mattlev2 / split-page.py
Last active December 13, 2021 01:58 — forked from tshrinivasan/split-page.py
Split a PDF vertically, used for scanned double sided PDF pages
# Source http://stackoverflow.com/a/15741856/1301753
import copy
import sys
import math
import PyPDF2
def split_pages(src, dst):
src_f = open(src, 'r+b')
dst_f = open(dst, 'w+b')
@kirienko
kirienko / reverse_imposing.py
Last active March 3, 2024 08:59 — forked from tshrinivasan/split-page.py
Split a PDF vertically, used for imposed scanned double sided PDF pages
# see https://stackoverflow.com/questions/51973437/reverse-pdf-imposition
import copy
import sys
import math
import pyPdf
"""
Reverse imposing:
@luzfcb
luzfcb / installing_pyenv_on_ubuntu_based_distros.md
Last active May 2, 2024 17:51
Quick install pyenv and Python

Tested only on Ubuntu 22.04, KDE Neon User Edition (based on Ubuntu 22.04) and OSX Mojave or higher.

will probably work on other newer versions, with no changes, or with few changes in non-python dependencies (apt-get packages)

NOTE: Don't create a .sh file and run it all at once. It may will not work. Copy, paste, and execute each command below manually. :-)

Ubuntu

# DO NOT RUN THIS AS A ROOT USER
@PCreations
PCreations / rxjs-diagrams.md
Last active January 18, 2024 08:52
Super Intuitive Interactive Diagrams to learn combining RxJS sequences by Max NgWizard K
@actuino
actuino / bt_speaker-raspberry_pi-zero_w.md
Last active June 29, 2024 03:14
Setting up a Bluetooth Speaker from the command line on a raspberry Pi Zero W

The setup of a bluetooth speaker on a Pi Zero W is pretty touchy.

Please get in touch via Twitter @actuino or http://www.actuino.fr/ if you've got comments or improvements to this quick draft.

First checks

  • Use a solid power source
  • check the speaker works on another hardware (android phone f.i.)
  • make sure you've updated your Raspbian, install and run rpi-update just in case.
@rosswd
rosswd / dev.sh
Last active April 5, 2020 06:53
Dev setup guide for Raspberry Pi. Python, Virtualenv, Git and Terminal.
# Change the Terminal Font
sudo vi /etc/default/console-setup
# set FONTFACE="Terminus"
# set FONTSIZE="16x32"
# Useful apt commands
sudo apt-get install -s git # simulate
apt-cache show git # package info
apt-cache show git | grep '^Size' # size only
apt-get install [package] --no-install-recommends --show-progress # don't install recommended packages
@beeman
beeman / remove-all-from-docker.sh
Created November 15, 2016 03:04
Remove all from Docker
# Stop all containers
docker stop `docker ps -qa`
# Remove all containers
docker rm `docker ps -qa`
# Remove all images
docker rmi -f `docker images -qa `
# Remove all volumes
@olzaragoza
olzaragoza / CSP: browser-sync
Created August 11, 2016 20:05
Content-Security-Policy for developing with Browsersync
<meta http-equiv="Content-Security-Policy" content="default-src 'none'; connect-src http://localhost:3000 ws://localhost:3000; script-src 'sha256-6w7vfY25rjzxRvjgGUXxQWVtH2vipu/5/hnX06LWvHo=' ws://localhost:3000 http://localhost:3000;">
@Lewiscowles1986
Lewiscowles1986 / rPi3-ap-setup.sh
Last active July 16, 2023 15:33
Raspberry Pi 3 access-point-setup
#!/bin/bash
#
# This version uses September 2017 august stretch image, please use this image
#
if [ "$EUID" -ne 0 ]
then echo "Must be root"
exit
fi
@kasparsd
kasparsd / index.php
Last active July 3, 2021 00:22
Convert .mo to .po and .po to .mo
<?php
session_start();
$_SESSION['last_post'] = time();
$_SESSION['ip'] = $_SERVER['REMOTE_ADDR'];
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Online Tools for WordPress Developers</title>