Skip to content

Instantly share code, notes, and snippets.

View matdombrock's full-sized avatar
🏠
Working from home

Mathieu Dombrock matdombrock

🏠
Working from home
View GitHub Profile
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
</head>
<script>
function fTest(file)
{
$.ajax({
url:file,
@matdombrock
matdombrock / LinkList.php
Created November 4, 2014 21:46
Display links to all files inside a folder on your server.
@matdombrock
matdombrock / aRandomBitly.html
Last active August 29, 2015 14:08
Generates a page with a link to a another random bitly page.
<div id="result">loading...</div>
<p id="reload">CLICK HERE TO GENERATE A NEW LINK</p>
<script>
function randomString(len, charSet) {
charSet = charSet || 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
var randomString = '';
for (var i = 0; i < len; i++) {
var randomPoz = Math.floor(Math.random() * charSet.length);
randomString += charSet.substring(randomPoz,randomPoz+1);
@matdombrock
matdombrock / ajax_contact_form.html
Last active October 19, 2016 09:45
Dead Simple Ajax Contact Form
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
$('#submit').click(function(){
$.post("send.php", $("#mycontactform").serialize(), function(response) {
$('#success').html(response);
@matdombrock
matdombrock / child-theme.css
Created November 7, 2014 23:31
WP child theme template for personal use
Theme Name: Twenty Fourteen Child
Theme URI: http://example.com/twenty-fourteen-child/
Description: Twenty Fourteen Child Theme
Author: John Doe
Author URI: http://example.com
Template: twentyfourteen
Version: 1.0.0
Tags: light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready
Text Domain: twenty-fourteen-child
*/
@matdombrock
matdombrock / hare.lua
Created November 7, 2014 23:34
Meant to be used with turtles in the ComputerCraft mod for MineCraft
t = turtle
n = 1 --item slot
function reload()
while t.getItemCount(n) <1 do
print("reload item slot")
sleep(3)
@matdombrock
matdombrock / pyramid.lua
Created November 7, 2014 23:36
Build a Pyramid with a building turtle in the MineCraft mod ComputerCraft
b = 0 --bricks laid
w = 0 --wall number
h = 200 --height of the structure in layers
i = 0 --current number layers
x = 64--how wide the base should be
n = 1 --selection number for inv
function start()
turtle.up()
end
@matdombrock
matdombrock / tower.lua
Created November 7, 2014 23:38
Build a tower with a building turtle in the ComputerCraft mod for MineCraft
b = 0 --bricks laid
w = 0 --wall number
h = 80 --height of the structure in layers
i = 0 --current number layers
x = 6--how wide the base should be
n = 1 --selection number for inv
function start()
turtle.digUp()
turtle.up()
end
@matdombrock
matdombrock / randTower.lua
Created November 7, 2014 23:38
Build a randomized tower with a turtle in the MineCraft mod ComputerCraft
b = 0 --bricks laid
w = 0 --wall number
h = 80 --height of the structure in layers
i = 0 --current number layers
x = 6--how wide the base should be
n = 1 --selection number for inv
function start()
turtle.digUp()
turtle.up()
end
@matdombrock
matdombrock / phpMailer_example.php
Created November 7, 2014 23:40
PHPmailer Example
<?php
//PHP mailer
//very important to require this of course!!
require_once('PHPMailer/class.phpmailer.php');
$email = new PHPMailer();
$email->From = '[email protected]';
$email->FromName = 'Form name here';
$email->Subject = 'Subject line fo email to be sent.';