Skip to content

Instantly share code, notes, and snippets.

View JayHoltslander's full-sized avatar
💭
I may be slow to respond.

Jay Holtslander JayHoltslander

💭
I may be slow to respond.
View GitHub Profile
@plasticbrain
plasticbrain / php-curl.php
Created September 11, 2012 01:10
PHP: Using cURL
<?php
// Initialize cURL
$ch = curl_init();
// The URL to load
curl_setopt($ch, CURLOPT_URL, 'http://www.url-to-load.com');
// Uncomment the following two lines to send POST data
// curl_setopt($ch,CURLOPT_POST, count($post_data_array));
@bgallagh3r
bgallagh3r / wp.sh
Last active March 24, 2024 03:12
Wordpress: Bash Install Script -- Downloads latest WP version, updates wp-config with user supplied DB name, username and password, creates and CHMOD's uploads dir, copies all the files into the root dir you run the script from, then deletes itself!
#!/bin/bash -e
clear
echo "============================================"
echo "WordPress Install Script"
echo "============================================"
echo "Database Name: "
read -e dbname
echo "Database User: "
read -e dbuser
echo "Database Password: "
@mikeygee
mikeygee / 01-before.html
Created May 7, 2012 07:45
truncate blog posts in jekyll
<!-- using the truncate filter -->
{% for post in site.posts limit:10 %}
<h2><a href="{{ post.url }}">{{ post.title }}</a></h2>
<span class="post-date">{{ post.date | date: "%B %d, %Y" }}</span>
{% if post.content.size > 2000 %}
{{ post.content | truncatewords: 300 }} <!-- bad! content gives you rendered html and you will truncate in the middle of a node -->
<a href="{{ post.url }}">read more</a>
{% else %}
{{ post.content }}
{% endif %}
@ScottPhillips
ScottPhillips / .htaccess
Created February 2, 2012 04:30
Common .htaccess Redirects
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/
@jaredatch
jaredatch / gist:1629862
Created January 17, 2012 23:54
Remove hentry from post_class()
<?php
/**
* Remove 'hentry' from post_class()
*/
function ja_remove_hentry( $class ) {
$class = array_diff( $class, array( 'hentry' ) );
return $class;
}
add_filter( 'post_class', 'ja_remove_hentry' );

Sass/Less Comparison

In this document I am using Sass's SCSS syntax. You can choose to use the indented syntax in sass, if you prefer it, it has no functional differences from the SCSS syntax.

For Less, I'm using the JavaScript version because this is what they suggest on the website. The ruby version may be different.

Variables