Skip to content

Instantly share code, notes, and snippets.

View Shane24's full-sized avatar

Shane Moloney Shane24

  • Ireland
View GitHub Profile
@Shane24
Shane24 / gist:39a62c44e92ebcf91ab5
Created August 17, 2015 11:23
Ireland Counties (including all Dublin postcodes) list
'counties' => [
'Antrim', 'Armagh', 'Carlow', 'Cavan', 'Clare', 'Cork',
'Derry', 'Donegal', 'Down', 'County Dublin','Dublin 1','Dublin 2', 'Dublin3',
'Dublin 4', 'Dublin 5', 'Dublin 6', 'Dublin 6W', 'Dublin 7', 'Dublin 8',
'Dublin 9', 'Dublin 10', 'Dublin 11', 'Dublin 12', 'Dublin 13',
'Dublin 14,', 'Dublin 15', 'Dublin 16', 'Dublin 17',
'Dublin 18', 'Dublin 20', 'Dublin 22', 'Dublin 24', 'Fermanagh', 'Galway',
'Kerry', 'Kildare', 'Kilkenny', 'Laois', 'Leitrim', 'Limerick',
'Longford', 'Louth', 'Mayo', 'Meath', 'Monaghan', 'Offaly',
'Roscommon', 'Sligo', 'Tipperary', 'Tyrone', 'Waterford', 'Westmeath',
@Shane24
Shane24 / gist:f0d0ae02a6d3b516ec60
Last active August 29, 2015 14:22
AdBlock blocked id's and classes
#adimg1, #adlayer, #adnews, #adposition3, #adright, #ads-col, #adsHeader, #ads_bottom, #ads_right, #ads_top, #ads_wrapper, #adsdiv, #adsense, #adsense_block, #adsense_inline, #adsensewide, #adspace, #adspace_top, #adspot-300x250-pos-1, #adspot-300x250-pos-2, #adtext, #adtop, #adv-masthead, #adv-top, #advert1, #advert2, #advertise, #advertisement1, #advertisetop, #advertising_wrapper, #adverts, #advtop, #adwrapper, #banner-ad, #bannerAd, #bannerAdWrapper, #banner_slot, #banner_topad, #bannerad, #bigAd, #bigad, #body_ad, #bottomAd, #bottomAds, #bottom_ad, #bq_homeMiddleAd, #btm_ads, #btmad, #btnAds, #centerads, #cmn_ad_tag_head, #companionAd, #content-header-ad, #contentAd, #content_ads, #content_adv, #contentad, #dart-container-728x90, #dfp_ad_Entry_728x90, #dfp_ad_Home_728x90, #divAd, #div_prerollAd_1, #download_ad, #featuread, #featured-ads, #featuredAds, #footer_ad, #footer_ads, #game-ad, #googlead, #gridAdSidebar, #head-ad, #header-ads, #headerAd, #headerAdContainer, #header_ad, #homead, #ka_adRightSkyscra
@Shane24
Shane24 / gist:8c9535047fabeb17caaa
Created November 21, 2014 12:32
Simple python server
Open up a terminal and:
$ cd /home/somedir
$ python -m SimpleHTTPServer
Server will start in port 8000. You will get the message:
Serving HTTP on 0.0.0.0 port 8000 ...
Now open a browser and type the following address:
@Shane24
Shane24 / Jekyll rakefile
Created August 11, 2014 16:37
Jekyll rakefile
desc "deploy to staging"
task :staging do
local_dir = "./_site/"
remote_dir = "/home/projectname/htdocs/"
host = "1.2.3.4"
ssh_user = "user"
system "find #{local_dir} -type f -exec chmod 0644 {} +"
system "find #{local_dir} -type d -exec chmod 0755 {} +"
@Shane24
Shane24 / gist:8638113
Created January 26, 2014 19:37
WP- Site move SQL
UPDATE wp_options SET option_value = replace(option_value, 'http://oldwebsiteurl.com', 'http://newsiteurl.com') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET guid = replace(guid, 'http://oldwebsiteurl.com', 'http://newsiteurl.com');
UPDATE wp_posts SET post_content = replace(post_content, 'http://oldwebsiteurl.com', 'http://newsiteurl.com');
@Shane24
Shane24 / gist:5687024
Created May 31, 2013 18:41
Wordpress database update thingy
UPDATE wp_options SET option_value = replace(option_value, 'http://ncd.localhost:8888', 'http://your-subdomain.logo24.com') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET guid = replace(guid, 'http://ncd.localhost:8888', 'http://your-subdomain.logo24.com');
UPDATE wp_posts SET post_content = replace(post_content, 'http://ncd.localhost:8888', 'http://your-subdomain.logo24.com');
@Shane24
Shane24 / index.html
Created March 20, 2013 22:21
A CodePen by Shane24. canvasslider
<html lang="en">
<head>
<meta charset="utf-8" />
<title>jQuery UI Slider - Vertical slider</title>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.2/themes/smoothness/jquery-ui.css" />
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.2/jquery-ui.js"></script>
<link rel="stylesheet" href="/resources/demos/style.css" />
<script>
var textfield = document.getElementById('amount1');