Skip to content

Instantly share code, notes, and snippets.

View hackprime's full-sized avatar

Yury Krapivko hackprime

View GitHub Profile
@jb68
jb68 / user.py.diff
Last active August 4, 2020 08:52
freeipa user-add/remove/mod trigger a custom script
diff --git a/user.py b/user.py
index cb47cbb..6b9ff36 100644
--- a/user.py
+++ b/user.py
@@ -40,7 +40,7 @@ from ipalib import _, ngettext
from ipalib import output
from ipalib import x509
from ipaplatform.paths import paths
-from ipapython.ipautil import ipa_generate_password
+from ipapython.ipautil import ipa_generate_password, run
anonymous
anonymous / japanese.md
Created March 18, 2017 10:44
japanese.md
@grantland
grantland / AGB-001_Light_Mod.md
Last active November 9, 2024 15:30
AGB-001 Front/Backlight Mod Instructions

AGB-001 Front/Backlight Mod Instructions

AGB-001 Backlight Mod

Requirements

  • AGB-001
  • ASS101 screen
@kwmiebach
kwmiebach / pytest.md
Last active August 30, 2024 07:44 — forked from amatellanes/pytest.sh
pytest cheat sheet

Usage

(Create a symlink pytest for py.test)

pytest [options] [file_or_dir] [file_or_dir] ...

Help:

@archydragon
archydragon / webm.sh
Last active April 25, 2016 11:01
WebM cutter
#!/bin/bash
usage() {
echo "WebM cutter and uploader."
echo "Usage: $0 <source> <start time> <length> [-subs]"
echo "Example: $0 video.mkv 00:10:15 00:00:30"
exit 1
}
if [ $# -eq 0 ]; then usage; fi
/**
* Create an array with `len` elements.
*
* @param [initFunc] Optional: a function that returns
* the elements with which to fill the array.
* If the function is omitted, all elements are `undefined`.
* `initFunc` receives a single parameter: the index of an element.
*/
function initArray(len, initFunc) {
if (typeof initFunc !== 'function') {
@eclubb
eclubb / sqlite2pg.sh
Created March 30, 2012 17:20
Script to import SQLite3 database into PostgreSQL
#!/bin/sh
# This script will migrate schema and data from a SQLite3 database to PostgreSQL.
# Schema translation based on http://stackoverflow.com/a/4581921/1303625.
# Some column types are not handled (e.g blobs).
SQLITE_DB_PATH=$1
PG_DB_NAME=$2
PG_USER_NAME=$3
@Suor
Suor / update-sublime.pl
Created February 4, 2012 03:01
Sublime Text 2 updater for Linux
#!/usr/bin/perl
use v5.10;
use strict;
use warnings FATAL => 'all';
use Mojo::UserAgent;
my $latest_url = Mojo::UserAgent->new->get('http://www.sublimetext.com/2')
@mattd
mattd / gist:1006398
Created June 3, 2011 14:12
nginx try_files with a proxy_pass
server {
root /var/www/example.com/static;
server_name example.com;
access_log /var/log/nginx/example.com.access.log;
error_log /var/log/nginx/example.com.error.log;
try_files /maintenance.html @proxy;
location @proxy {
proxy_pass http://127.0.0.1:10001;