Skip to content

Instantly share code, notes, and snippets.

View djekl's full-sized avatar
:octocat:
Working from home

Alan Wynn djekl

:octocat:
Working from home
View GitHub Profile
@djekl
djekl / SQL_update.php
Created August 12, 2013 11:45
Function to pull all SQL files in and pass to a model (use with caution)
<?php
/**
* public sql_update()
*/
function sql_update()
{
@header('Content-Type: Text/Plain');
$sql_dir = FCPATH . 'sql/';
$last_file = $sql_dir . '.last';
@djekl
djekl / gist:6304447
Created August 22, 2013 08:11
facebook share
http://www.facebook.com/sharer.php
?s=100
&p[url]=http%3A%2F%2Ftools.pingdom.com%2Ffpt%2FdGMt5O%2Fhttp%3A%2F%2Fxboxapi.com
&p[title]=Pingdom Website Speed Test
&p[summary]=Load%20time%20of%20http%3A%2F%2Fxboxapi.com%20w.%20Pingdom%20Tools%3A%20756%20ms%20from%20undefined.%20Size%3A%20237.9%20kB.%20Rqsts%3A%2020.
@djekl
djekl / Google-Static-Map-Maker.markdown
Created September 24, 2013 06:29
A Pen by Alan Wynn.
@djekl
djekl / example map.php
Created November 5, 2013 10:39
Google Maps Custom image map
<?php
$config['verbal_address'] = "Verbal Arts Centre\nStable Lane and Mall Wall, Bishop\nStreet Within, Londonderry, BT48 6PU";
$config['verbal_map_latlng'] = '54.9940,-7.3252';
$config['verbal_map_size']['width'] = '250';
$config['verbal_map_size']['height'] = '200';
$config['verbal_map_img'] = 'http://maps.googleapis.com/maps/api/staticmap?center=' . $config['verbal_map_latlng'];
$config['verbal_map_img'] .= '&zoom=16&size=' . $config['verbal_map_size']['width'] . 'x' . $config['verbal_map_size']['height'];
$config['verbal_map_img'] .= '&sensor=true';
@djekl
djekl / PoC-Live-updating-Chart.js.md
Created November 11, 2013 21:57
A Pen by Alan Wynn.

PoC Live updating Chart.js

This is just a test of a chart.js line chart that changes based on updated data.

A Pen by Alan Wynn on CodePen.

License.

@djekl
djekl / gist:8254209
Last active January 2, 2016 04:59
This is what I fire before every request to check if the user is logged in, and if not then attempt via remember cookie, then fire the auth.login event if logged in.
<?php
App::before(function($request)
{
if (!Auth::check())
{
Auth::viaRemember();
if (Auth::check())
{
@djekl
djekl / convertTwoSpacesToFour.sublime-macro
Last active January 3, 2016 10:59 — forked from joshmfrankel/convertTwoSpacesToFour.sublime-macro
This now doesn't leave the whole text selected :)
[
{
"args": null,
"command": "select_all"
},
{
"args": {
"setting": "tab_size",
"value": 2
},
@djekl
djekl / Xbox oAuth Login.php
Created January 17, 2014 00:10
OLD CODE <DOES NOT WORK>
<?
define('CLIENT_ID', 'CLIENT_ID');
define('REDIRECT_URI', 'URL');
define('USERNAME', 'USERNAME');
define('PASSWORD', 'PASSWORD');
function curl_request($url, $cookie = '', $post_data = '', $headers_ary = '') {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);

Bootstrap 3 Slider for new site

This is still a work in progress, hoping to get this finished tonight

A Pen by Alan Wynn on CodePen.

License.

Keybase proof

I hereby claim:

  • I am djekl on github.
  • I am djekl (https://keybase.io/djekl) on keybase.
  • I have a public key whose fingerprint is 928E 4816 1767 01CF 726B 9FD1 96DD EEDA 9DCA 2ECF

To claim this, I am signing this object: