Using POST vs. GET to log out
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
/** | |
* Include | |
* add_action('admin_notices', 'lm_admin_message'); | |
* in your setup, then call | |
* lm_admin_message('error', 'the message, fool!'); or | |
* lm_admin_message('notice', 'the notice, fool!'); | |
* to display the admin message. | |
* | |
* @param string|null $type Supports "error" and "notice" (or null if it's the setup hook call) | |
* @param string|null $message Body of your message (or null if it's the setup hook call) |
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 distancePoints = function(p1, p2) { | |
// Find the distance between two points | |
return Math.sqrt(Math.pow(p2[0] - p1[0], 2) + Math.pow(p2[1] - p1[1], 2)); | |
}; | |
var intersectCircles = function (c1, r1, c2, r2) { | |
// Find the points of intersection for two circles | |
// Based on: http://stackoverflow.com/a/3349134 | |
var d = distancePoints(c1, c2); | |
if (d > r1 + r2) // Circles do not overlap |
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 | |
apt-get update | |
#Additional Packages | |
apt-get install -y cifs-utils winbind smbclient bindfs gvfs gvfs-bin keyutils unzip php5-ldap php5-mssql zsh | |
wget --no-check-certificate http://install.ohmyz.sh -O - | sh | |
chsh vagrant -s /bin/zsh |
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
PImage src; | |
int circleWidth = 13; | |
void setup() { | |
size(displayWidth, displayHeight); | |
background(0); | |
noStroke(); | |
src = loadImage("src/UnionSta-KC Skyline.jpg"); | |
//src.resize(width, height); | |
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
-- Please set your vpn connection name and password here | |
set VPNName to "VPN name" | |
set VPNpassword to "VPN password" | |
tell application "System Events" | |
tell current location of network preferences | |
set VPNService to service VPNName | |
end tell | |
set isConnected to connected of current configuration of VPNService |
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 | |
use Aws\Sns\SnsClient; | |
use Illuminate\Contracts\Broadcasting\Broadcaster; | |
class SnsBroadcaster implements Broadcaster | |
{ | |
/** @var SnsClient */ | |
private $sns; | |
/** @var array */ |