Skip to content

Instantly share code, notes, and snippets.

View yratof's full-sized avatar
🍊
Eating an orange

Andrew yratof

🍊
Eating an orange
View GitHub Profile
@yratof
yratof / git.html
Created August 23, 2013 11:46
GIT HELP
<style>
*{font-family: helvetica;}
body{color: #333}
a{color:#1baebe;}
div{margin: 1em; padding: 1em; border-bottom: 1px solid;}
textarea{width:100%; padding: 10px; font-size: 1em}
</style>
<h1>A little bit of Git</h1>
<div>
@yratof
yratof / gist:6779497
Created October 1, 2013 14:36
Echo navigation name
$nav_menu = wp_get_nav_menu_object(21); echo $nav_menu->name;
@yratof
yratof / grid.scss
Last active December 24, 2015 13:49
Each and every last column
$gutter: 100% / 36.2;
$gutter_em: 1rem; //This needs to be rem to not mess up margins
// This calculate the gutter
@function col_width($n, $use_calc: false) {
$divisor: 12 / $n;
@if ($use_calc) {
$gutter_offset: $gutter_em * ($divisor - 1);
@return calc((100% - #{$gutter_offset}) / #{$divisor});
}
@yratof
yratof / gist:6826263
Created October 4, 2013 13:54
Add this to your <head> - HTML5 for lt ie9
<!--[if lt IE 9]>
<script>
document.createElement('header');
document.createElement('nav');
document.createElement('section');
document.createElement('article');
document.createElement('aside');
document.createElement('footer');
</script>
@yratof
yratof / property.php
Last active December 28, 2015 00:09
Property Search
<?php
/*
* Template Name: Property Search
*/
get_header();
if(isset($_GET['propertysearch'])) {
$property_areas = $_GET['property_areas'];
$property_type = $_GET['property_type'];
$town = $_GET['town'];
@yratof
yratof / style.css
Created November 13, 2013 09:56
Old Boneham Stylesheet
/* =Boneham */
/* =Clean the world */
* {margin:0;padding:0;}
/* Form Styling */
.field-validation-error
{
color : Red;
float : right;
@yratof
yratof / A-Pen-by-Andrew-Lazarus.markdown
Created November 14, 2013 16:20
A Pen by Andrew Lazarus.
@yratof
yratof / gist:7476759
Last active December 28, 2015 09:09
Arduino temp + rgb
#include <SPI.h>
#include <Ethernet.h> // Initialize the libraries.
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED }; //I left the MAC address and IP address blank.
byte ip[] = { 192, 168, 1, 99 }; // You will want to fill these in with your MAC and IP address.
EthernetServer server(80); // Assigning the port forwarded number. It's almost always 80.
String readString; // We will be using strings to keep track of things.
@yratof
yratof / _.sh
Last active March 10, 2016 09:34
Wordpress Gitignore
git config --global core.excludesfile ~/.gitignore_global
@yratof
yratof / Functions.php
Created December 10, 2013 09:56
Remove update references from wordpress website
// This function is designed to remove all mentions that updates are available.
// Mostly because whereever there is a message, there is an update button allowing
// you to update with a touch of a button. This might break the website completely!
// Remove normall message
add_action('admin_menu','wphidenag');
function wphidenag() {
remove_action( 'admin_notices', 'update_nag', 3 );
}