Skip to content

Instantly share code, notes, and snippets.

View postphotos's full-sized avatar
🎒

Leo Postovoit postphotos

🎒
View GitHub Profile
@postphotos
postphotos / gist:5922385
Last active December 19, 2015 07:59
Console update stylesheet
// Thanks Joe Murphy!
$('head').append('<link href="css/master.css" media="screen" rel="stylesheet" type="text/css" />');
@postphotos
postphotos / gist:6090189
Last active December 20, 2015 06:59
Fix for NGPS's no <Style> tags using javascript
<script language="javascript" type="text/javascript">
document.write('<style type="text/css"> \n\
fooo { foo:foo; } \n\
fooo { foo:foo; } \n\
fooo { foo:foo; } \n\
</style>');
</script>
@postphotos
postphotos / gist:6090535
Last active December 20, 2015 06:59
A quick table, because CSS makes things pretty
<!DOCTYPE html>
<html>
<head>
<title></title>
<body>
<style type="text/css">
.gridtable {
font-size:13px;
font-weight: 400;
border: 0px;
@postphotos
postphotos / gist:6095298
Created July 27, 2013 16:11
Why did I forget this? Poor-man's compiling in one execution
./configure && make && sudo make install
@postphotos
postphotos / gist:6186204
Last active December 20, 2015 19:49
Easy twitter/FB share
<script type="text/javascript">
var bnbartweethead = escape('DA charges man suspected of crashing car into Colfax bus stop');
var bnbartweetlink = 'http://dpo.st/1cdssaa';
document.write('<a href="http://twitter.com/share?text=' + bnbartweethead + '&url=' + bnbartweetlink +'&via=denverpost&related=denverpostbrk" target="_blank" style="position:relative; top:-3px; display: inline-block; margin: 0 0 2px 10px; font-weight: normal; font-size: 14px; line-height: 14px; padding: 5px 6px; border: 1px solid #fff; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px;">Tweet this</a>');
</script>
<hr>
@postphotos
postphotos / gist:6253601
Last active December 21, 2015 04:59
Simple server for python using sh shell / command line
python -m SimpleHTTPServer
@postphotos
postphotos / gist:6330651
Created August 24, 2013 22:00
Magic unicorn on loop abilities
<?php
$min=1; $max=14; //the random parameters
?>
<object width="746" height="413"><param name="movie" value="http://www.youtube.com/p/CAAA1242CA3E37B4?version=3&hl=es_ES&fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param>
<?php
//in index the script randomize the number between $min $max
echo "<iframe src=\"http://www.youtube.com/embed/videoseries?list=PL2AC71FC1DAB7F216&autoplay=1&index=".rand($min,$max)."\"
width=\"100%\" height=\"500\" frameborder=\"0\"></iframe>
";
?>
/*
Theme Name: Postphotos dot ewe ess
Theme URI: http://postphotos.us
Description: Theme based on Foundation
Author: Leo Postovoit
Author URI: http://postphotos.us/p/
Template: reverie
Version: 0.0.2
Color Pallete: http://www.colourlovers.com/palette/3000130
*/
@postphotos
postphotos / gist:ea5fb26787fbe4c91f2c
Created March 12, 2015 22:52
javascript for pdf dropdown selection filling
var s1 = this.getField("enrollStartPeriod").value;
if (s1=="aug2015") event.value = "12/18/15";
else if (s1=="jan2016") event.value = "5/31/16";
else event.value = "";
function sendFormByEmail(e)
{
// Remember to replace this email address with your own email address
var email = "dev@relativityschool.org";
var s = SpreadsheetApp.getActiveSheet();
var headers = s.getRange(1,1,1,s.getLastColumn()).getValues()[0];
var message = "";
var subject = "EQUIPMENT REQUEST - ";
// This prepends the email with whatever you wnat to call it.