Skip to content

Instantly share code, notes, and snippets.

View shrop's full-sized avatar
👋

Mark Shropshire shrop

👋
View GitHub Profile
{% for post in posts %}
<div class="blog_post">
<div class="blog_col">
<a class="post_title_cell post_title" href="{{ url('node/' ~ post.nid) }}">
<h3>{{ post.title }}</h3>
<div class="comments">0 Comments</div>
</a>
<div class="cell_180x135 meta">
<h4>{{ post.date |date('M m, Y')}}</h4>
@hongymagic
hongymagic / pr.md
Last active December 15, 2017 09:50 — forked from piscisaureus/pr.md
Checkout pull-requests from Atlassian Stash without adding remote

Locate the section for your stash remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = [email protected]:private/repository.git

Now add the line fetch = +refs/pull-requests/*:refs/remotes/origin/pull-requests/* to this section. Obviously, change the stash url to match your project's URL. It ends up looking like this:

@gabrielhpugliese
gabrielhpugliese / meteor-windows-vagrant-tutorial.md
Last active April 19, 2022 14:37
Tutorial for running Meteor in Windows using Vagrant

Tutorial: Meteor in Windows using Vagrant

BEFORE YOU CONTINUE:

  • Now, Meteor runs in any Windows without any line of this tutorial. Just download the Meteor binary! Yay!!
  • mrt is no longer used with Meteor 1.0

These days some people were discussing at meteor-talk group about running Meteor at Windows and I’ve recommended them using Vagrant. It’s a very developer-friendly piece of software that creates a virtual machine (VM) which let you run any operating system wanted and connect to it without big efforts of configuration (just make the initial installation and you have it working).

Many packages (I've tested) for running Meteor+Vagrant fails because Meteor writes its mongodb file and also other files inside local build folder into a shared folder between the Windows host and the Linux guest, and it simply does not work. So I've put my brain to work and found a solution: do symlinks inside the VM (but do not use ln. Use mount so git can follow it). It’s covered on

<?php
/**
* An implementation of the AES cipher (CBC mode).
* For reference http://csrc.nist.gov/publications/fips/fips197/fips-197.pdf
*
* @author Stephen Harris ([email protected])
* @license GPL
*
* Example usage:
@brandonb927
brandonb927 / LICENSE.md
Last active October 11, 2020 09:13 — forked from valpackett/LICENSE.md
Use Markdown in Evernote with Marked.app
       DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
               Version 2, December 2004

Copyright (C) 2012 Brandon B. [email protected]

Everyone is permitted to copy and distribute verbatim or modified copies of this license document, and changing it is allowed as long as the name is changed.

DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE

@mislav
mislav / _readme.md
Last active July 22, 2025 23:54
tmux-vim integration to transparently switch between tmux panes and vim split windows

I use tmux splits (panes). Inside one of these panes there's a Vim process, and it has its own splits (windows).

In Vim I have key bindings C-h/j/k/l set to switch windows in the given direction. (Vim default mappings for windows switching are the same, but prefixed with C-W.) I'd like to use the same keystrokes for switching tmux panes.

An extra goal that I've solved with a dirty hack is to toggle between last active panes with C-\.

Here's how it should work:

@deekayen
deekayen / generate_thumbnails.sh
Last active December 14, 2015 08:29
Convert a directory full of targa, gif, jpeg, and tiff images to jpg thumbnails.
#!/bin/sh
# Proper function of this script on Mac requires:
# install tiff 3.6.1 or newer http://www.libtiff.org/
# brew install ghostscript
# brew install imagemagick
timer()
{
if [[ $# -eq 0 ]]; then
@svasva
svasva / publish.js
Created February 22, 2013 10:07
Meteor publish-with-relations complex use
Meteor.publish('bike', function(id) {
return Meteor.publishWithRelations({
handle: this,
collection: Bikes,
filter: id,
mappings: [
{
key: 'userId',
options: { fields: config.users.publicFields },
collection: Meteor.users
@ttscoff
ttscoff / 5by5 Episode Link Grabber.md
Last active December 11, 2015 02:19
Browser bookmarklet which generates a Markdown list of all the show links on a 5by5 episode page, autoselects the result for copying and provides next/prev navigation
@groodt
groodt / README.md
Created December 17, 2012 12:26 — forked from ma11hew28/README.md

Homebrew Meteor Formula

To install Meteor with the Homebrew formula [below][3], run:

brew install https://gist.github.com/raw/4317935/05084353d3cd50acad7e88e01c3f6463b42c0ed3/meteor.rb

This Homebrew Meteor Formula is based on https://install.meteor.com.