Skip to content

Instantly share code, notes, and snippets.

View therealmarv's full-sized avatar
:octocat:

therealmarv

:octocat:
View GitHub Profile
@therealmarv
therealmarv / private.xml
Last active December 20, 2015 15:29 — forked from erotte/private.xml
fix white space typo
<?xml version="1.0"?>
<!-- Key Mappimgs for http://pqrs.org/macosx/keyremap4macbook/ -->
<root>
<item>
<name>German Umlaute on US Keyboard Layout with ALT modifier</name>
<appendix>Change Option+o to ö</appendix>
<appendix>Change Option+a to ä</appendix>
<appendix>Change Option+u to ü</appendix>
<appendix>Change Option+e to €</appendix>
<identifier>remap.org.openhort.german_umlaute_with_ALT_modifier</identifier>
server {
listen 80;
server_name konklone.com;
return 301 https://$host$request_uri;
}
# optional: the 'spdy' at the end of the listen command below turns on SPDY support.
server {
listen 443 ssl spdy;
@therealmarv
therealmarv / checkopenssl.md
Last active October 12, 2021 19:14
Check OpenSSL version from Python

Open python

python

and type

>>> import ssl
>>> ssl.OPENSSL_VERSION
'OpenSSL 1.0.1g 7 Apr 2014'
@therealmarv
therealmarv / paralles8ubuntu.md
Last active August 29, 2015 13:59
My Parallels 8 experience on OS X 10.9 and why I cannot recommend it for Linux developers.

#My Parallels 8 experience on OS X 10.9 and why I cannot recommend it for Linux developers.

Every Ubuntu 12.04 LTS downloaded through Parallels 8 will show this message after a while:

Parallels Tools error

Because I'm getting this error reproducable on every Ubuntu VM on Parallels 8 I can only guess that support for old Parallels versions are not getting enough attention (maybe this also happens on Parallels 9?).

How to reproduce this error:

  • Install Parallels 8 (Parallels 9 is untested because I will not spend one cent more on Parallels).
# nginx config for A+ SSL Labs rating as of 9-2014
# Broad legacy compatibility including IE8/XP, Android 2.3+, openssl 0.9.8 clients
# Blocks most bot scans IP probes.
#
# *** Assumes: _HOSTNAME_ is replaced ***
#
# Includes OCSP stapling, HSTS Strict Transport security,
# session resumption, legacy backwards compatibility (XP, Android 2.3-4.3)
#
# Requires nginx 1.6.x. See: http://nginx.org/en/linux_packages.html, e.g.:
@therealmarv
therealmarv / pgbouncer
Created March 5, 2015 15:05
/etc/init.d/pgbouncer for Ubuntu 12.04
#!/bin/bash
### BEGIN INIT INFO
# Provides: pgbouncer
# Required-Start: $syslog $remote_fs
# Required-Stop: $syslog $remote_fs
# Should-Start: postgresql
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: start pgbouncer
  UPDATE `NEXUS 5`
     SET `VERSION`='5.1', `BUILD`='LMY47D', `RECOVERY`='CUSTOM', `ROOTED`=1
   WHERE `VERSION`='5.0.1' && `BUILD`='LRX22C' && `RECOVERY`='CUSTOM' && `ROOTED`=1
         && `WANNA_KEEP_USERDATA`=1;

This guide is forked and updated for Android 5.1 OTA from me. Big thanks to the original author eyecatchup and his guide from LRX21O to LRX22C here.

This guide also works without any problems for encrypted phones because data partition is not touched.

@therealmarv
therealmarv / remove_jpg_if_raw_exists.py
Created April 2, 2015 06:01
Remove jpg when raw existing
#!/usr/bin/env python
# Script: remove_jpg_if_raw_exists.py
#
# Description: This script looks in all sub directories for
# pairs of JPG and RAW files.
# For each pair found the JPG is moved to a
# waste basket directory.
# Otherwise JPG is kept.
#
# Author: Thomas Dahlmann
@therealmarv
therealmarv / pybossa-rewrite-apache.md
Last active August 29, 2015 14:24
PyBossa Rewrite Apache

Original nginx rewrite lines, just for reference!

location ~ /api/app {
        rewrite ^/api/app /api/project$1 permanent;
}

location ~ /app {
        rewrite ^/app(.*) /project$1 permanent;
}
@therealmarv
therealmarv / fl
Last active March 29, 2024 22:26 — forked from McNull/fl
Open current directory in forklift
#!/bin/bash
# Open current directory in forklift 4
# Adapted from https://gist.github.com/elentok/6218781
# Adapted from comment https://gist.github.com/elentok/6218781#comment-891115
# Added optional path argument and removed using the clipboard buffer.
set -e
if [ -z "$@" ]; then