Skip to content

Instantly share code, notes, and snippets.

View marsvogel's full-sized avatar

Christopher Bischoff marsvogel

View GitHub Profile
@marsvogel
marsvogel / terminal-vim.md
Last active March 8, 2016 18:48
Vim.app - Apple Script used in Automator app to launch terminal vim from OSX finder

terminal-vim.scpt

This script is used in an application Vim.app created using Apple Automator to open files and folders from OSX Finder. I am using the Vim Yosemite icon by Jason Long to make it just a little bit nicer to look at my /Applications folder.

Dependencies

Not really dependencies, but I've built it using following versions:

@marsvogel
marsvogel / web-servers.md
Created January 26, 2016 13:43 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@marsvogel
marsvogel / gist:9a1cd063f57c345cfda0
Created December 1, 2014 13:54
Use gulp-uglify
# Shell
# npm install --save-dev gulp-uglify
# gulpfile.js
var gulp = require("gulp");
var uglify = require('gulp-uglify');
gulp.task('scripts',function(){
@marsvogel
marsvogel / dabblet.css
Created August 7, 2014 13:13
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
@marsvogel
marsvogel / og-meta.html
Created November 1, 2012 10:11
Facebook Open Graph Meta Tags
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Open Graph Standard-Angaben</title>
<!-- Standard-Syntax -->
<meta property="og:{tagName}" content="{tagValue}"/>
<!--
@marsvogel
marsvogel / jquery.RCorientation-0.1.js
Created October 29, 2012 19:11
JavaScript jQuery Check If Lanscape Or Portrait Mode On Mobile Devices
/*! =========================================================================
* jQuery Orientation Plugin
* ==========================================================================
*
* Dieses Plugin bietet die Möglichkeit Callback Funktionen an
* den Lanscape und Portrait Modus zu binden.
*
* # Benutzung
*
* Um eine Funktion im Landscape Modus auszuführen benötigt man folgende
@marsvogel
marsvogel / css-style-placeholder-text.css
Created October 28, 2012 21:13
CSS Style Placeholder Text
/*
* Don’t try to combine the selectors because it won’t work!
*
* In Firefox the placeholder attribute inherhits all the
* input styles. To solver this be more specific with
* input.YourClass
*/
/*webkit-browsers like Chrome and Safari*/
.YourClass::-webkit-input-placeholder {
@marsvogel
marsvogel / javascript-detecting-versions-of-ie.js
Created August 7, 2012 20:39 — forked from padolsey/gist:527683
JavaScript Detecting versions Of IE
// ----------------------------------------------------------
// A short snippet for detecting versions of IE in JavaScript
// without resorting to user-agent sniffing
// ----------------------------------------------------------
// If you're not in IE (or IE version is less than 5) then:
// ie === undefined
// If you're in IE (>=5) then you can determine which version:
// ie === 7; // IE7
// Thus, to detect IE:
// if (ie) {}
@marsvogel
marsvogel / check-if-element-exists.js
Created August 7, 2012 19:23
JavaScript jQuery Check If Element Exists
/*
* Mit jQuery prüfen ob ein Element existiert.
*/
if ( $("#ElementID").length > 0 ) {
// Element exisiert
} else {
// Element exisiert nicht
}