Skip to content

Instantly share code, notes, and snippets.

View ItsMeAra's full-sized avatar
👋

Ara L Abcarians ItsMeAra

👋
View GitHub Profile
@mikemurray
mikemurray / iteration.php
Created August 6, 2013 21:16
Grid system row assistance for loops.
<?php
// Loop Variables
$max_per_row = 2;
?>
<?php for($i = 0; $i < count($data); $i++): ?>
<?php if($i % $max_per_row == 0 || $i == 0): ?>
<div class="grid-row"> <!-- Start Grid row -->
<?php endif ?>
@parkji
parkji / Gruntfile.js
Last active December 20, 2015 22:59
Grunt file for building and serving jekyll sites. Means you can just do grunt watch instead of running two Jekyll commands
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
shell: {
jekyllBuild: {
command: 'jekyll build'
},
jekyllServe: {
command: 'jekyll serve'
}
@mikemurray
mikemurray / transmit_force_unmount.sh
Last active September 14, 2016 13:47
Kill ALL transmit disk sshfs mounts. Use this when you are unable to eject / mount a sshfs volume because of a disconnect. Don't use this to unmount them normally if you have the option. This could be dangerous, so use at your own risk!
# List all running transmit disk tasks
# ---------------------------------------------------------------------------
ps aux | grep "Transmit Disk"
# Kill All transmit disk tasks.
#
# Potentially dangerious as it could apply to all users on system.
# ---------------------------------------------------------------------------
pkill -9 -f "Transmit Disk"
@pmeissner
pmeissner / gist:6328273
Created August 24, 2013 13:55
statamic opengraph
{{ if segment_2 == slug }}
<meta property="og:title" content="{{ title }}">
<meta property="og:type" content="article">
<meta property="og:description" content="{{ content|striptags|truncate:200 }}">
<meta property="og:url" content="{{ permalink }}">
<meta property="og:image" content="{{ _site_url }}{{ transform src='{{ featured_image }}' width='1200' height='600' action='smart' }}">
<meta property="og:site_name" content="{{ _site_name }}">
<meta property="fb:admins" content="722169618">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@pmeissner">
module Jekyll
class ArchiveGenerator < Generator
safe true
def generate(site)
collate_by_month(site.posts).each do |month, posts|
page = ArchivePage.new(site, month, posts)
site.pages << page
end
end
@nlindley
nlindley / archivepage.rb
Last active December 30, 2015 04:18 — forked from ilkka/archivepage.rb
module Jekyll
class ArchivePage < Page
include Convertible
attr_accessor :site, :pager, :name, :ext, :basename, :dir, :data, :content, :output
# Initialize new ArchivePage
# +site+ is the Site
# +month+ is the month
# +posts+ is the list of posts for the month
@mobilemind
mobilemind / git-tag-delete-local-and-remote.sh
Last active August 1, 2025 03:27
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName
@nielsdoorn
nielsdoorn / animationPolyfill.js
Last active December 28, 2020 01:06
Eyes that follow your mouse cursor. Using HTML5 canvas.
// Paul Irish animation loop polyfill
// https://gist.github.com/paulirish/1579671
(function() {
var lastTime = 0;
var vendors = ['ms', 'moz', 'webkit', 'o'];
for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {
window.requestAnimationFrame = window[vendors[x]+'RequestAnimationFrame'];
window.cancelAnimationFrame = window[vendors[x]+'CancelAnimationFrame']
|| window[vendors[x]+'CancelRequestAnimationFrame'];
@t-io
t-io / osx_install.sh
Last active April 27, 2025 20:06
Install most of my Apps with homebrew & cask
#!/bin/sh
echo Install all AppStore Apps at first!
# no solution to automate AppStore installs
read -p "Press any key to continue... " -n1 -s
echo '\n'
echo Install and Set San Francisco as System Font
ruby -e "$(curl -fsSL https://raw.github.com/wellsriley/YosemiteSanFranciscoFont/master/install)"
echo Install Homebrew, Postgres, wget and cask
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
@markgoodyear
markgoodyear / 01-gulpfile.js
Last active May 5, 2023 03:21
Comparison between gulp and Grunt. See http://markgoodyear.com/2014/01/getting-started-with-gulp/ for a write-up.
/*!
* gulp
* $ npm install gulp-ruby-sass gulp-autoprefixer gulp-cssnano gulp-jshint gulp-concat gulp-uglify gulp-imagemin gulp-notify gulp-rename gulp-livereload gulp-cache del --save-dev
*/
// Load plugins
var gulp = require('gulp'),
sass = require('gulp-ruby-sass'),
autoprefixer = require('gulp-autoprefixer'),
cssnano = require('gulp-cssnano'),