Skip to content

Instantly share code, notes, and snippets.

View robertkraig's full-sized avatar
💭
I may be slow to respond.

Robert Kraig robertkraig

💭
I may be slow to respond.
View GitHub Profile
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
class CI_Session
{
var $flash_key = 'flash'; // prefix for "flash" variables (eg. flash:new:message)
function __construct()
{
$this->_sess_run();

Awesome PHP

A list of amazingly awesome PHP libraries, resources and shiny things.

Composer

<?php
class CLIColors
{
private $foreground_colors = array();
private $background_colors = array();
public function __construct()
{
phabricator@phabricator:/var/local$ cat update_phabricator.sh
#!/bin/sh
set -e
set -x
# This is an example script for updating Phabricator, similar to the one used to
# update <https://secure.phabricator.com/>. It might not work perfectly on your
# system, but hopefully it should be easy to adapt. This script is not intended
# to work without modifications.
W: Failed to fetch http://old-releases.archive.ubuntu.com/ubuntu/dists/raring/main/source/Sources 404 Not Found [IP: 91.189.92.201 80]
W: Failed to fetch http://old-releases.archive.ubuntu.com/ubuntu/dists/raring/restricted/source/Sources 404 Not Found [IP: 91.189.92.201 80]
W: Failed to fetch http://old-releases.archive.ubuntu.com/ubuntu/dists/raring/universe/source/Sources 404 Not Found [IP: 91.189.92.201 80]
W: Failed to fetch http://old-releases.archive.ubuntu.com/ubuntu/dists/raring/multiverse/source/Sources 404 Not Found [IP: 91.189.92.201 80]
W: Failed to fetch http://old-releases.archive.ubuntu.com/ubuntu/dists/raring/main/binary-amd64/Packages 404 Not Found [IP: 91.189.92.201 80]
@robertkraig
robertkraig / designer.html
Created November 20, 2014 07:09
designer
<link rel="import" href="../ace-element/ace-element.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
#!/bin/sh
set -e
set -x
# This is an example script for updating Phabricator, similar to the one used to
# update <https://secure.phabricator.com/>. It might not work perfectly on your
# system, but hopefully it should be easy to adapt. This script is not intended
# to work without modifications.
Q
W
E
R
---
A
@robertkraig
robertkraig / git-cheat-list.md
Created February 17, 2017 09:51
Git cheat list

Git cheat list

  • all commits that your branch have that are not yet in master

    git log master..<HERE_COMES_YOUR_BRANCH_NAME>
    
  • setting up a character used for comments

git config core.commentchar

using System.Linq;
using System.Net;
using System.Net.Http;
using System.Threading.Tasks;
using System.Collections.Specialized;
class DataService {
public NameValueCollection Query { get; set; }
public string Endpoint { get; set; }
public FormUrlEncodedContent QueryEncoded {