Skip to content

Instantly share code, notes, and snippets.

View skoskie's full-sized avatar

Shelton Koskie skoskie

View GitHub Profile

Font Face

A mixin for writing @font-face rules in SASS.

Usage

Create a font face rule. Embedded OpenType, WOFF2, WOFF, TrueType, and SVG files are automatically sourced.

@include font-face(Samplino, fonts/Samplino);
@BBGuy
BBGuy / dc_emw.php
Last active November 16, 2022 14:08
Working with Drupal commerce entities using entity_metadata_wrapper. Just a bunch of exampled copied from the web or added by me. will keep adding over time. now more then just commerce entities
<?php
// Basics
// Get a value.
$value = $wrapper->field_x->value();
// If the field is a reference field you will get the field object
// To get the wrapper back use:
$wrapper_b = $wrapper->field_ref;
// To set a value.
@alexandregz
alexandregz / .profile
Last active May 27, 2016 22:32
to add to .profile (ash shell used with Synology NAS)
# place to git, ipkg, another shell commands
PATH=/volume1/@optware/bin:$PATH
export PATH
# more useful prompt shell
#PS1="`hostname`> "
PS1='\u@\h:\w'
case `id -u` in
0) PS1="${PS1}# ";;
#!/bin/bash
#
# ProcessWire upgrade script
#
# Upgrades ProcessWire ./wire directory.
# Use either master of dev branch.
#
#
ProcessWire Webpage Workflow
1. Setup v-hosts, database and install processwire (usually fixate's boilerplate generator)
a. the generator already does bower install.
2. Determine project structure and install all required modules.
3. Setup all required fields and templates in PW admin.
4. Program the logic of the web page. All php that handles dynamic data. Site specific and contact controller.
5. Use styleguide to program initial css.
6. Program site css that was not done in styleguide.
7. finalize by adding javascripts that are used.
@sudar
sudar / package-list.txt
Created March 9, 2014 03:13
List of packages that are installed by default in DigitalOcean LAMP image. As of 09-March-2014
$ dpkg --get-selections | grep -v deinstall
acpid install
adduser install
anacron install
apache2-mpm-prefork install
apache2-utils install
apache2.2-bin install
apache2.2-common install
apt install
@mkay
mkay / update-modx.sh
Created March 8, 2014 22:57
MODX CLI updater
#!/bin/bash
########################################################
#
# MODX (modx.com) CLI updater
# Kreuder 20140308 [email protected]
#
########################################################
#
# Description: perform a MODX Basic Upgrade via CLI.
#
@petemcw
petemcw / brew-instructions.sh
Last active July 14, 2025 23:22
Setup dnsmasq on Mac OS X
# Install `dnsmasq` and configure for *.test domains
$ brew install dnsmasq
$ vim /usr/local/etc/dnsmasq.conf
# Reload configuration and clear cache
$ sudo launchctl unload /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist
$ sudo launchctl load /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist
$ dscacheutil -flushcache
@imlucas
imlucas / postman_scripts.js
Created February 3, 2014 13:18
notes on postman scripting
// Notes on how to extend [postman](http://www.getpostman.com/) to support
// sharing small util scripts, like fabric tasks, along with a collection
// so we have repeatables/easy access for non-tech folks.
//
// How to extend schema? Build on collection or a new ground up like
// environments? Struct looks something like:
var scripts = [
{
"name": "Continuous Health Check",
"description": "Runs health-check every 60 seconds and logs result",
@damonjones
damonjones / UpcEan.php
Created November 20, 2013 17:10
UPC/EAN Validator
<?php
namespace Insig\UtilBundle\Validator\Constraints;
use Symfony\Component\Validator\Constraint;
/**
* Metadata for the UpcEanValidator.
*
* @Annotation