Skip to content

Instantly share code, notes, and snippets.

View barrasme's full-sized avatar
💻
Coding up a storm

Lyle Barras barrasme

💻
Coding up a storm
View GitHub Profile
@barrasme
barrasme / slack_notification.php
Created March 16, 2017 13:42 — forked from alexstone/slack_notification.php
Fire a Slack Notification via CURL
<?php
// (string) $message - message to be passed to Slack
// (string) $room - room in which to write the message, too
// (string) $icon - You can set up custom emoji icons to use with each message
public static function slack($message, $room = "engineering", $icon = ":longbox:") {
$room = ($room) ? $room : "engineering";
$data = "payload=" . json_encode(array(
"channel" => "#{$room}",
"text" => $message,
@barrasme
barrasme / Tweet This.kmmacros
Created January 27, 2016 14:22
A simple Keyboard Maestro macro to tweet the highlighted text.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<dict>
<key>Activate</key>
<string>Normal</string>
<key>CreationDate</key>
<real>475168983.47021598</real>
<key>IsActive</key>
@barrasme
barrasme / New Tweet
Created January 26, 2016 11:42
A really simple Keyboard Maestro macro to create a new tweet using Tweetbot.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<dict>
<key>Activate</key>
<string>Normal</string>
<key>CreationDate</key>
<real>475168983.47021598</real>
<key>IsActive</key>
<IfModule mod_rewrite.c>
RewriteEngine On
# !IMPORTANT! Set your RewriteBase here and don't forget trailing and leading
# slashes.
# If your page resides at
# http://www.example.com/mypage/test1
# then use
# RewriteBase /mypage/test1/
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f