Skip to content

Instantly share code, notes, and snippets.

@illucent
illucent / responsive_gmap
Created March 29, 2014 12:39
link to responsive google map tutorial
http://webomnizz.com/blog/javascript/how-to-make-responsive-google-map-with-google-map-api/
<?php
// Get and sanitize the current URL
function _s_get_url() {
// Get URL
$url = @( $_SERVER['HTTPS'] != 'on' ) ? 'http://' . $_SERVER['SERVER_NAME'] : 'https://' . $_SERVER['SERVER_NAME'];
$url .= ( $_SERVER['SERVER_PORT'] !== 80 ) ? ":" . $_SERVER['SERVER_PORT'] : '';
$url .= $_SERVER['REQUEST_URI'];
@illucent
illucent / googlemaps+snazzymaps.com
Created March 29, 2014 16:52
google snazzy maps colors
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyA-a8nqFDTgdlhHsVlyez9pQN-e5nuaifA&sensor=false&extension=.js"></script>
<script> google.maps.event.addDomListener(window, 'load', init);
var map;
function init() {
var mapOptions = {
center: new google.maps.LatLng(49.565125,34.508213),
zoom: 16,
zoomControl: false,
@illucent
illucent / gist:9888490
Created March 31, 2014 09:15
pure css triangles
http://appendto.com/2013/03/pure-css-triangles-explained/
@illucent
illucent / gist:9888604
Created March 31, 2014 09:22
nginx.conf
server {
listen 80;
server_name www.example.com example.com;
root /var/www/www.example.com/web;
if ($http_host != "www.example.com") {
rewrite ^ http://www.example.com$request_uri permanent;
}
index index.php index.html;
@illucent
illucent / gist:9899600
Created March 31, 2014 18:58
nginx.conf
user www-data www-data;
worker_processes 2;
pid /var/run/nginx.pid;
events {
worker_connections 512;
accept_mutex_delay 50ms;
function sendFormByEmail(e)
{
// Remember to replace this email address with your own email address
var email = "you@example.com";
var s = SpreadsheetApp.getActiveSheet();
var headers = s.getRange(1,1,1,s.getLastColumn()).getValues()[0];
var message = "";
var subject = "New Hire: ";
#!/bin/sh
### BEGIN INIT INFO
# Provides: myservice
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Put a short description of the service here
# Description: Put a long description of the service here
/*
Copyright 2011 Martin Hawksey
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
FILE SPACING:
# double space a file
sed G
# double space a file which already has blank lines in it. Output file
# should contain no more than one blank line between lines of text.
sed '/^$/d;G'