Skip to content

Instantly share code, notes, and snippets.

@shoman4eg
shoman4eg / output.css
Last active July 9, 2018 16:22
Less space utilities
.mt-5 {
margin-top: 5px;
}
.mr-5 {
margin-right: 5px;
}
.mb-5 {
margin-bottom: 5px;
}
.ml-5 {
@waltz
waltz / .zshrc
Created January 27, 2014 22:22
ZSH, iTerm2 Alt-Arrow (Left/Right) Key remap
# Remap alt-left and alt-right to forward/backward word skips.
# via @waltz, https://gist.github.com/waltz/8658549
bindkey "^[^[[D" backward-word
bindkey "^[^[[C" forward-word
<?php
// Version CSS file in a theme
wp_enqueue_style(
'theme-styles',
get_stylesheet_directory_uri() . '/style.css',
array(),
filemtime( get_stylesheet_directory() . '/style.css' )
);
@chancesmith
chancesmith / readme.md
Last active November 24, 2021 11:47
Wordpress Setup shell script

Setup Instructions

  • add wp-setup.sh to your home directory
  • in terminal $ chmod +x wp-setup.sh so we can execute this without admin permissions needed
  • add an alias in your terminal profile and source the profile...(see command in next step)
  • $ echo '\n\n alias wpsetup="~/wp-setup.sh"' >> ~/.zshrc && . ~/.zshrc

Usage

Now, when you are ready run $ wpsetup in the folder you want to setup Wordpress locally in.

<div>
<label for="sort-by">Sort by</label>
<select id="sort-by">
<option value="manual">Featured</option>
<option value="price-ascending">Price: Low to High</option>
<option value="price-descending">Price: High to Low</option>
<option value="title-ascending">A-Z</option>
<option value="title-descending">Z-A</option>
<option value="created-ascending">Oldest to Newest</option>
<option value="created-descending">Newest to Oldest</option>
@Spea
Spea / README.md
Created May 10, 2012 20:49
Script to auto reply emails.

General

This script can be used in conjunction with the ISPmail tutorial and the Roundcube autoreply plugin

Installation

Database setup

Create the following table in the database where you created the tables from the ISPmail tutorial.

@stevebowman
stevebowman / AWSLambdaSimpleSMS.js
Last active June 22, 2023 12:09
AWS Lambda Function to send an SMS message via the Twilio API
console.log('Loading event');
// Twilio Credentials
var accountSid = '';
var authToken = '';
var fromNumber = '';
var https = require('https');
var queryString = require('querystring');
@Abizern
Abizern / .gitignore
Created November 21, 2010 12:45
Global git ignore file
# Mac OS X
*.DS_Store
# Xcode
*.pbxuser
*.mode1v3
*.mode2v3
*.perspectivev3
*.xcuserstate
project.xcworkspace/
@learncodeacademy
learncodeacademy / webpack.config.js
Created January 8, 2016 03:55
Sample Basic Webpack Config
var debug = process.env.NODE_ENV !== "production";
var webpack = require('webpack');
module.exports = {
context: __dirname,
devtool: debug ? "inline-sourcemap" : null,
entry: "./js/scripts.js",
output: {
path: __dirname + "/js",
filename: "scripts.min.js"
@wesrice
wesrice / random-repeater.php
Created February 27, 2012 16:02
Return a random row of data from an ACF repeater field
<?php
// Get the repeater field
$repeater = get_field( 'repeater_field_name' );
// Get a random rows. Change the second parameter in array_rand() to how many rows you want.
$random_rows = array_rand( $repeater, 2 );
// Loop through the random rows if more than one is returned
if( is_array( $random_rows ) ){