Skip to content

Instantly share code, notes, and snippets.

View nalipaz's full-sized avatar

Nicholas Alipaz nalipaz

  • Huntington Beach, CA
View GitHub Profile
@rafaeltuelho
rafaeltuelho / install-gosu-centos.md
Last active February 23, 2022 04:56
installing gosu on a centos docker box
# Install gosu.  https://github.com/tianon/gosu
ENV GOSU_VERSION=1.11
RUN gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \
    && curl -o /usr/local/bin/gosu -SL "https://github.com/tianon/gosu/releases/download/${GOSU_VERSION}/gosu-amd64" \
    && curl -o /usr/local/bin/gosu.asc -SL "https://github.com/tianon/gosu/releases/download/${GOSU_VERSION}/gosu-amd64.asc" \
    && gpg --verify /usr/local/bin/gosu.asc \
    && rm /usr/local/bin/gosu.asc \
    && rm -r /root/.gnupg/ \
 && chmod +x /usr/local/bin/gosu \
@cl4u2
cl4u2 / mousejail.sh
Created February 10, 2015 09:49
jail the mouse to a specific rectangle. Based on xdotool.
#!/bin/bash
SLEEPTIME=0.2
# JAIL PARAMETERS
MAXX=1024
MAXY=768
BOUNDSCREEN=0
while true; do
@wernight
wernight / inotifyexec.py
Last active June 27, 2023 22:47
inotifywait helper that executes a command on file change (for Linux, put it in ~/bin/)
#!/usr/bin/env python
"""Use inotify to watch a directory and execute a command on file change.
Watch for any file change below current directory (using inotify via pyinotify)
and execute the given command on file change.
Just using inotify-tools `while inotifywait -r -e close_write .; do something; done`
has many issues which are fixed by this tools:
* If your editor creates a backup before writing the file, it'll trigger multiple times.
* If your directory structure is deep, it'll have to reinitialize inotify after each change.
@cloud99
cloud99 / changepassword.php
Created July 26, 2012 10:17 — forked from mattrude/changepassword.php
LDAP PHP Change Password Page
<?php
$message = array();
$message_css = "";
function changePassword($user,$oldPassword,$newPassword,$newPasswordCnf){
global $message;
global $message_css;
$server = "localhost";