Skip to content

Instantly share code, notes, and snippets.

View eyecatchup's full-sized avatar

Stephan Schmitz eyecatchup

View GitHub Profile
# Update, upgrade and install development tools:
apt-get update
apt-get -y upgrade
apt-get -y install build-essential git-core curl libssl-dev \
libreadline5 libreadline5-dev \
zlib1g zlib1g-dev \
libmysqlclient-dev \
libcurl4-openssl-dev \
libxslt-dev libxml2-dev
@eyecatchup
eyecatchup / chrome-remote-devtools.bat
Last active December 17, 2015 05:29
Simple windows batchfile to open Google Chrome's remote debugging console on your host machine. 1.) Save the batchfile to your machine. 2.) Now, whenever you want to start the remote devtools console, just usb-connect your device and double click the file. It will start the ADB server, set up the port forwarding and open a new Chrome window list…
@echo off
REM Note: If adb.exe is not in your %PATH% variable, add it or use an absolute path!
adb kill-server
adb forward tcp:9123 localabstract:chrome_devtools_remote
REM To open the remote dev console in a new tab (if chrome is already running),
REM use the --instant-url flag instead of --new-window.
start "Chrome" chrome --remote-debugging-port=9123 --new-window localhost:9123
<?php
function getClientIP() {
$ip = null;
//check ip from share internet
if (!empty($_SERVER['HTTP_CLIENT_IP'])) {
$ip = $_SERVER['HTTP_CLIENT_IP'];
}
//to check ip is pass from proxy
else if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
<!-- the content markup -->
<div id="tab1" class="tab-content">
Tab 1 Content
</div>
<div id="tab2" class="tab-content">
Tab 2 Content
</div>
<div id="tab3" class="tab-content">
Tab 3 Content
</div>

#Dezoomify #Reassemble tiles of a zoomify-powered image

This script makes one downloadable image from an image viewable via a flash zoomify interface.

Input : the URL of a site containing a zoomify viewer. Output : An image that you can download (in Firefox).

#Try it If you are not interested in the source code and just want to assemble tiles of (dezoomify) a zoomify-powered image, go there : unzoomify an image

@eyecatchup
eyecatchup / how-to-install.txt
Last active November 17, 2019 17:43
Instructions how to install (and run) "Leapcast" on Windows.
1. Download https://github.com/dz0ny/leapcast/archive/master.zip
2. Extract zip to C:\leapcast
3.1 Download Python 2.7:
x86: http://www.python.org/ftp/python/2.7.5/python-2.7.5.msi
x64: http://www.python.org/ftp/python/2.7.5/python-2.7.5.amd64.msi
3.2 Install Python to C:\Python27
NOTE: If you have a newer version, install 2.7.5 and edit the environment variable and change for example "C:\Python33" to "C:\Python27".
4.1 Download Setuptools here: http://www.lfd.uci.edu/~gohlke/pythonlibs/#setuptools
<?php
/**
* SEOstats Example - Get SEMrush Metrics as Graphs (nonstatic)
*
* @package SEOstats
* @author Stephan Schmitz <eyecatchup@gmail.com>
* @copyright Copyright (c) 2010 - present Stephan Schmitz
* @license http://eyecatchup.mit-license.org/ MIT License
* @updated 2013/08/17
*/
@eyecatchup
eyecatchup / ascii-binary-converter.js
Last active November 6, 2023 20:03
JavaScript native ASCII to Binary / Binary to ASCII convert functions.
// ABC - a generic, native JS (A)scii(B)inary(C)onverter.
// (c) 2013 Stephan Schmitz <eyecatchup@gmail.com>
// License: MIT, http://eyecatchup.mit-license.org
// URL: https://gist.github.com/eyecatchup/6742657
var ABC = {
toAscii: function(bin) {
return bin.replace(/\s*[01]{8}\s*/g, function(bin) {
return String.fromCharCode(parseInt(bin, 2))
})
},
/* The Grid ---------------------- */
.lt-ie9 .row { width: 940px; max-width: 100%; min-width: 768px; margin: 0 auto; }
.lt-ie9 .row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; }
.lt-ie9 .row.large-collapse .column,
.lt-ie9 .row.large-collapse .columns { padding: 0; }
.lt-ie9 .row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; }
.lt-ie9 .row .row.large-collapse { margin: 0; }
.lt-ie9 .column, .lt-ie9 .columns { float: left; min-height: 1px; padding: 0 15px; position: relative; }
.lt-ie9 .column.large-centered, .columns.large-centered { float: none; margin: 0 auto; }
@eyecatchup
eyecatchup / prettyCss.sh
Created October 13, 2013 05:29
Bash script to "pretty-print" minified CSS.
#!/bin/bash
#Author: Stephan Schmitz, https://github.com/eyecatchup, <eyecatchup@gmail.com>
#Based on work by: Michael Bianco, http://developer.mabwebdesign.com/, <software@mabwebdesign.com>
#Description: Bash script to create a pretty-printed version of a minified CSS file.
# Note: Requires GNU sed. See: http://www.gnu.org/software/sed//sed.html
#Usage: prettyCss.sh inputfile [outputfile]
# If [outputfile] is not given, pretty-printed CSS will be send to stdout.
SED_COMMAND=/bin/sed # NOTE: Change the SED_COMMAND variable value to the path to your GNU sed!