Skip to content

Instantly share code, notes, and snippets.

View l4ci's full-sized avatar

Volker Otto l4ci

View GitHub Profile
@justinmc
justinmc / gist:9149719
Last active October 15, 2018 18:05
Sample Gulpfile
var gulp = require('gulp');
var clean = require('gulp-clean');
var jshint = require('gulp-jshint');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
var imagemin = require('gulp-imagemin');
var bases = {
app: 'app/',
@amk221
amk221 / gist:6999721
Last active May 28, 2021 15:11
Shopify shortcodes, post meta and featured images

Shopify shortcodes, post meta and featured images

Example

Hello World this is an example Shopify blog post with a [my_shortcode].
Lorem ipsum dolor sit amet, consectetur [another_shortcode] elit. Proin vel lacinia nunc,
id elementum leo. Donec eget lacus sed dui interdum mollis.
<!--meta-->
<!--featured_image--> http://placehold.it/640x480 <!--/featured_image-->

Some other meta data

@raveren
raveren / cryptographically_secure_random_strings.php
Last active November 21, 2023 12:35
Generate cryptographically secure random strings. Based on Kohana's Text::random() method and this answer: http://stackoverflow.com/a/13733588/179104
function random_text( $type = 'alnum', $length = 8 )
{
switch ( $type ) {
case 'alnum':
$pool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
break;
case 'alpha':
$pool = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
break;
case 'hexdec':
@christophengelmayer
christophengelmayer / Contract Killer 3.md
Last active November 25, 2023 10:24 — forked from malarkey/Contract Killer 3.md
Contract Killer 3 - German Translation / Deutsche Übersetzung von Contract Killer 3, einer Vertragsvorlage für Webdesign und -development Tätigkeiten.

Contract Killer 3 deutsch

Letzte Änderung: 21.01.2013

Zwischen uns [Unser Firmenname] und Ihnen [Name des Kunden]

Zusammenfassung:

Wir tun immer unser Bestes um Ihre Bedürfnisse und Erwartungen zu erfüllen, jedoch ist es wichtig Dinge niederzuschreiben damit jeder weiß, was was ist, wer was und wann tuen soll und was passiert wenn etwas schief läuft. In diesem Vertrage werden Sie keine komplizierten, in Juristensprache verfassten Geschäftsbedingungen oder lange Passagen von unleserlichem Text finden.

@davidnknight
davidnknight / send_email.php
Created July 20, 2012 12:01
PHP Send Mail (Plaintext and HTML)
<?php
/**
* Send email
* @param string|array $email
* @param object $from
* @param string $subject
* @param string $message
* @param string $headers optional
*/
function send_email($email, $from, $subject, $message, $headers = null)
<?php
// get the post UID from the URL
$uid = param('post');
if(!$uid) die(a::json(array(
'status' => 'error',
'msg' => 'The post could not be found',
)));
@siffring
siffring / .htaccess
Created March 4, 2012 17:33
htaccess to password protect a specific server
# ----------------------------------------------------------------------
# Password protect staging server
# Use one .htaccess file across multiple environments
# (e.g. local, dev, staging, production)
# but only password protect a specific environment.
# ----------------------------------------------------------------------
SetEnvIf Host staging.domain.com passreq
AuthType Basic
AuthName "Password Required"