Skip to content

Instantly share code, notes, and snippets.

View j's full-sized avatar

Jordan Stout j

View GitHub Profile
@j
j / gist:459e8d90f1fe3541a551ff096c66bf15
Last active October 15, 2019 00:29 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
Verifying my Blockstack ID is secured with the address 16Q52bE39tfP3TQgeTWF3bmoqcBr7Xf72V https://explorer.blockstack.org/address/16Q52bE39tfP3TQgeTWF3bmoqcBr7Xf72V
@j
j / HttpLinkSwitcher.js
Last active October 27, 2017 22:48
Link Switching Alternative
import { ApolloLink } from 'apollo-link';
import { HttpLink } from 'apollo-link-http';
export default class HttpLinkSwitcher extends ApolloLink {
constructor(clientOpts) {
super();
this.defaultClient = null;
this.clients = {};
<?php
/**
* Changes the class metadata databases to the test database.
*
* @author Jordan Stout <jordan.stout@zeetogroup.com>
*/
final class ChangeDatabaseEventListener
{
private $database;
@j
j / MyListener.php
Created December 7, 2011 22:26
How to pass Request to a DoctrineListener
<?php
namespace AcmeDemo\MyBundle\Listener;
use Doctrine\ORM\Event\OnFlushEventArgs;
use Symfony\Component\HttpFoundation\Request;
class MyListener
{
/**
@j
j / MyController.php
Created November 26, 2011 22:20
Ads the ability to use translations with or without variables in flash messages
<?php
[...]
$session->setFlash('error', array('flash.user.recover.password.already.requested', array('%username%' => $user->getUsername())));
$session->setFlash('notice', 'flash.notice.this.works.yay');
[...]
<?php
// This class gets the randomly generated pages from the session from the database to send it's data to the view
class LayoutRender {
[...]
private function setupSignupPath()
{
@j
j / gist:1282868
Created October 12, 2011 22:45
Symfony2 permission setup
#!/bin/sh
## SYMFONY ENVIRONMENT PERMISSION SETUP -- Run in root directory of application ##
# Set file and folder permissions
echo -e "Setting global file and folder permissions... "
find . -type d -print0 | xargs -0 chmod 0775
find . -type f -print0 | xargs -0 chmod 0664
echo -e "done!\n"
@j
j / MemcacheSessionStorage.php
Created October 7, 2011 17:29
Create a memcache session storage with optional storage backup
<?php
namespace JStout\MainBundle\Session;
use Symfony\Component\HttpFoundation\SessionStorage\NativeSessionStorage;
/**
* MemcacheSessionStorage.
*/
class MemcacheSessionStorage extends NativeSessionStorage
@j
j / MemcacheSessionStorage.php
Created October 7, 2011 17:27
Create a memcache session storage with optional storage backup
<?php
namespace ZGOffers\MainBundle\Session;
use Symfony\Component\HttpFoundation\SessionStorage\NativeSessionStorage;
/**
* MemcacheSessionStorage.
*/
class MemcacheSessionStorage extends NativeSessionStorage