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 | |
require("postmark.php"); | |
$postmark = new Postmark("your-api-key","from-email","optional-reply-to-address"); | |
if($postmark->to("reciver@example.com")->subject("Email Subject")->plain_message("This is a plain text message.")->send()){ | |
echo "Message sent"; | |
} |
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
#!/usr/bin/env sh | |
# | |
# Change the MAC Address on an Ubuntu Parallels Cloned VM | |
# Author: Kelly Becker (KellyLSB) | |
# Check for sudo access | |
SUDO=`sudo -n uptime 2>&1|grep "load"|wc -l` | |
if [ $SUDO -lt 1 ] | |
then | |
echo "You need to have sudo priveleges!" |
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 | |
# System-wide crontab file and cron job directory. Change these for your system. | |
CRONTAB='/etc/crontab' | |
CRONDIR='/etc/cron.d' | |
# Single tab character. Annoyingly necessary. | |
tab=$(echo -en "\t") | |
# Given a stream of crontab lines, exclude non-cron job lines, replace |
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
#!/usr/bin/env ruby | |
require 'getoptlong' | |
# Class Extensions | |
class String | |
def first | |
self[0..0] | |
end | |
def last |
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
#!/usr/bin/env ruby | |
require 'open3' | |
Open3.popen3('ping 127.0.0.1') do |i,o,e,t| | |
Thread.new do | |
while true | |
begin | |
system("stty raw -echo") | |
str = STDIN.getc.chomp | |
ensure |
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
import sublime, sublime_plugin, os | |
class RubyPostProcess(sublime_plugin.EventListener): | |
def on_pre_save(self, view): | |
syntax = os.path.basename(view.settings().get('syntax')) | |
syntax = os.path.splitext(syntax)[0] | |
if syntax == "Ruby": | |
replacements = [] | |
edit = view.begin_edit() |
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
--- | |
us: %m/%d/%Y |
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
/* | |
SublimeLinter default settings | |
*/ | |
{ | |
/* | |
Sets the mode in which SublimeLinter runs: | |
true - Linting occurs in the background as you type (the default). | |
false - Linting only occurs when you initiate it. | |
"load-save" - Linting occurs only when a file is loaded and saved. |
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
FROM ubuntu | |
MAINTAINER "Kelly Becker (kbecker@kellybecker.me)" | |
# Basic provisioning | |
RUN apt-get install apt-utils wget nano curl openssh-server | |
RUN wget --no-check-certificate https://gist.github.com/KellyLSB/8079486/raw/4d2b2f8e9b609258ef4f72ef13a50effd3bb224b/sources.list -O /etc/apt/sources.list | |
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32 16126D3A3E5C1192 | |
RUN apt-get update | |
RUN apt-get dist-upgrade -y |
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
import sublime, sublime_plugin, os, re | |
class RubyPostProcess(sublime_plugin.EventListener): | |
def on_pre_save(self, view): | |
syntax = os.path.basename(view.settings().get('syntax')) | |
syntax = os.path.splitext(syntax)[0] | |
filepath = view.file_name() | |
filename = os.path.basename(filepath) |
OlderNewer