Skip to content

Instantly share code, notes, and snippets.

View jayllellis's full-sized avatar

Jason Ellis jayllellis

View GitHub Profile
@tomhicks
tomhicks / plink-plonk.js
Last active November 12, 2024 19:08
Listen to your web pages
@jentanbernardus
jentanbernardus / vhost.md
Last active August 20, 2024 03:36
Setting Up Virtual Hosts in MAMP on Windows

1. Edit MAMP Apache configuration to include Virtual Hosts configuration

In File Explorer, go to C:\MAMP\conf\apache and open httpd.conf with your text editor.

Find this line:

# Virtual hosts
# Include conf/extra/httpd-vhosts.conf
@jayllellis
jayllellis / page-ids.php
Last active February 4, 2019 16:34
Get page IDs for certain kinds of pages
<?php
// Special pages -----------------
$frontpage_id = get_option( 'page_on_front' );
$blog_id = get_option( 'page_for_posts' );
// Page templates -----------------
$about_templates = get_pages(array(
'meta_key' => '_wp_page_template',
'meta_value' => 'page-about.php'
@jayllellis
jayllellis / placeholder.css
Last active September 20, 2018 19:08
Change placeholder colour
input[type="text"]::-webkit-input-placeholder{ /* Chrome/Opera/Safari */
color: pink;
}
input[type="text"]::-moz-placeholder { /* Firefox 19+ */
color: pink;
}
input[type="text"]:-ms-input-placeholder { /* IE 10+ */
color: pink;
}
input[type="text"]:-moz-placeholder { /* Firefox 18- */
@jayllellis
jayllellis / active-slide.js
Last active February 8, 2020 13:04
Add a class to current slide in bxSlider
$('.top-slider').bxSlider({
onSliderLoad: function(currentIndex) {
$('.top-slider').children().eq(currentIndex).addClass('active-slide');
},
onSlideAfter: function($slideElement){
$('.top-slider').children().removeClass('active-slide');
$slideElement.addClass('active-slide');
}
});
@gunjanpatel
gunjanpatel / amazon-ec2-ftp.md
Last active October 10, 2023 15:31
amazon ec2 LAMP and FTP installation and setup
@ValentinH
ValentinH / queryTwitter.php
Created January 5, 2014 10:35
How to query Twitter search API in PHP. This example shows how to query a hashtag and get the top 100 more recent results. * require CURL.
function queryTwitter($search)
{
$url = "https://api.twitter.com/1.1/search/tweets.json";
if($search != "")
$search = "#".$search;
$query = array( 'count' => 100, 'q' => urlencode($search), "result_type" => "recent");
$oauth_access_token = "ABCD";
$oauth_access_token_secret = "1234";
$consumer_key = "abcd";
$consumer_secret = "5678";
@rxaviers
rxaviers / gist:7360908
Last active November 19, 2024 04:20
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@hullen
hullen / get_gallery_attachments.php
Last active March 9, 2020 20:57
Extract images ids from gallery shortcode into post_content of the wordpress posts or custom post types.
@clarle
clarle / app.js
Created July 26, 2012 07:35
Short tutorial on how to use Express and node-mysql
// Module dependencies
var express = require('express'),
mysql = require('mysql');
// Application initialization
var connection = mysql.createConnection({
host : 'localhost',
user : 'root',