This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Vogue</title> | |
<style type="text/css"> | |
#social-logos { | |
overflow: hidden; | |
} | |
#social-logos a{ | |
float: left; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ContactUsController < ApplicationController | |
def index | |
end | |
def send_enquiry | |
if contact_form_valid? | |
ContactUsMailer.send_enquiry(contact_form_params).deliver | |
return redirect_to action: :thank_you | |
end | |
render :index |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
server_name _; | |
root /vagrant/www; | |
index index.html index.htm index.php; | |
expires -1; | |
location / { | |
try_files $uri $uri/ /index.php?q=$uri&$args; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
# | |
# Things I normally install when I first install Homebrew / Homebrew cask | |
# Make sure you've install XCode commandline tools & accepted the terms and conditions before running this. | |
# Homebrew stuff | |
## A nice text editor (Will show how to configure in another post) | |
brew install vim | |
brew install macvim |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
## | |
# Make your Mac feel like home... | |
# Shoutout to @dtsn for being generally awesome and getting me started. | |
# | |
# install it: | |
# curl -sL https://gist.github.com/BenNunney/7219538/raw/f9b933cca93b67dd63a2d8b1eeebb69e87dc9591/feels-like-home.sh | sh | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// I have a function, embedVine(), which is a Wordpress shortcode. It uses one attribute, $id which I've assigned to $vine_id to avoid confusion ($post_id etc). This shortcode takes the ID (Vine IDs are the ending of the Vine URL, e.g http://vine.co/v/hx9LlrZxdqV, the id = hx9LlrZxdqV) and embed's the Vine within a Wordpress post. The shortcode markup is [vine id='...']. | |
$vine_id = false; | |
global $vine_id; | |
function embedVine($atts) { | |
global $vine_id; | |
extract(shortcode_atts(array( | |
"id" => '' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/php | |
<?php | |
# Array of the servers you want to ping. | |
$servers = array('mikerogers.io', 'google.com', 'downserver.come'); | |
# PingDomain() from http://stackoverflow.com/a/9843251/445724 | |
function pingDomain($domain){ | |
$start_time = microtime(true); | |
$file = @fsockopen ($domain, 80, $errno, $errstr, 10); | |
$end_time = microtime(true); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
chrome.browserAction.onClicked.addListener(function(tab) { | |
alert('Oh hey there! You checky clicker!'); | |
chrome.tabs.executeScript(tab.id, {code: 'alert("I just came from the page!")'}); | |
chrome.tabs.executeScript(tab.id, {file: 'some_file.js'}); | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MikesBot < RTanque::Bot::Brain | |
NAME = 'Mikes Bot' | |
include RTanque::Bot::BrainHelper | |
TURRET_FIRE_RANGE = RTanque::Heading::ONE_DEGREE * 5.0 | |
def tick! | |
## main logic goes here | |
def tick! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Compiled source # | |
################### | |
*.com | |
*.class | |
*.dll | |
*.exe | |
*.o | |
*.so | |
# Packages # |