This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
header("Content-Type: text/x-vCalendar"); | |
header("Content-Disposition: inline; filename=MyvCalFile.vcs"); | |
?> | |
BEGIN:VCALENDAR | |
VERSION:2.0 | |
PRODID:-//hacksw/handcal//NONSGML v1.0//EN | |
X-WR-TIMEZONE:US/Eastern | |
X-WR-CALNAME:Presagis Event | |
X-WR-TIMEZONE:US/Eastern |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{exp:channel:entries channel="forms" dynamic="no" entry_id="{embed:form_id}"} | |
{exp:nsm_transplant:body} | |
{!-- check if we're using the recipients feature of freeform, if so, set some variables needed for later --} | |
{if form_recipients} | |
{exp:nsm_transplant:content id="use_recipients"}yes{/exp:nsm_transplant:content} | |
{form_recipients} | |
{exp:nsm_transplant:content id="recipient{row_count}" parse="inwards"}{recipient_name}|{recipient_email}{/exp:nsm_transplant:content} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//code to set up an action in my upd.module.php | |
$this->EE->load->dbforge(); | |
$data = array( | |
'class' => 'Module', | |
'method' => 'api_get_hash', | |
); | |
$this->EE->db->insert('actions', $data); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{!-- Looping and splitting entries --} | |
{exp:channel:entries channel="foo"} | |
{if count == 1} | |
<ul> | |
{/if} | |
<li>{bar}</li> | |
{if count == total_results} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Taken from http://william.shallum.net/random-notes/automatically-start-tmux-on-ssh-login | |
if [ "$PS1" != "" -a "${STARTED_TMUX:-x}" = x -a "${SSH_TTY:-x}" != x ] | |
then | |
STARTED_TMUX=1; export STARTED_TMUX | |
sleep 1 | |
( (tmux has-session -t remote && tmux attach-session -t remote) || (tmux new-session -s remote) ) && exit 0 | |
echo "tmux failed to start" | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# ## git-fresh | |
# | |
# Author: Tristan Blease <[email protected]> | |
# Website: tristanblease.com | |
# License: http://www.opensource.org/licenses/MIT | |
# | |
# Quick shell script to check the freshness of your git repository branches | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--noheading | |
--ignore-dir=public/assets | |
--ignore-dir=public/javascripts/cache | |
--ignore-dir=db | |
--ignore-dir=log | |
--type-add=js=.mustache | |
--type-set=coffee=.coffee,.cakefile | |
--type-set=tests=.spec,.feature,.rb | |
--type-set=ruby=.rb,.rhtml,.rjs,.rxml,.erb,.rake,.haml,.mustache | |
--type-set=mustache=.mustache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
partial = (fn, args...) -> | |
(innerArgs...) -> | |
args = args.concat(innerArgs) | |
fn(args...) | |
curry = (fn, arity = fn.length) -> | |
(args...) -> | |
innerFn = (arity) -> | |
if arity > 0 | |
curry partial(fn, args...), arity |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var bh = require('bulk-hogan'); | |
bh.baseDirectory = 'foo'; | |
var bh2 = { prototype: bh }; | |
console.log(bh.baseDirectory, bh2.baseDirectory); | |
bh2.baseDirectory = 'bar'; |
OlderNewer