Skip to content

Instantly share code, notes, and snippets.

Anselm Christophersen anselmdk

Block or report user

Report or block anselmdk

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Landish
Landish / jsconfig.md
Last active Aug 6, 2019
jsconfig.json
View jsconfig.md

jsconfig.json

{
  "compilerOptions": {
    "baseUrl": "./src",
    "target": "ES6",
    "jsx": "preserve",
    "allowSyntheticDefaultImports": true
  },
  "exclude": ["build", "node_modules"]
@sadikaya
sadikaya / git-bash-in-webstorm.md
Last active Aug 22, 2019
git bash inside Webstorm terminal
View git-bash-in-webstorm.md

Go to File -> Settings -> Tools -> Terminal and change Shell path based on the the installed git version.

for 64bit:

"C:\Program Files\Git\bin\sh.exe" --login -i

for 32bit:

"C:\Program Files (x86)\Git\bin\sh.exe" --login -i
@OlegIlyenko
OlegIlyenko / Event-stream based GraphQL subscriptions.md
Last active Sep 16, 2019
Event-stream based GraphQL subscriptions for real-time updates
View Event-stream based GraphQL subscriptions.md

In this gist I would like to describe an idea for GraphQL subscriptions. It was inspired by conversations about subscriptions in the GraphQL slack channel and different GH issues, like #89 and #411.

Conceptual Model

At the moment GraphQL allows 2 types of queries:

  • query
  • mutation

Reference implementation also adds the third type: subscription. It does not have any semantics yet, so here I would like to propose one possible semantics interpretation and the reasoning behind it.

@curtismcmullan
curtismcmullan / setup_selenium.sh
Last active Mar 30, 2019
Setup Selenium Server on Ubuntu 14.04
View setup_selenium.sh
#!/bin/bash
# Following the guide found at this page
# http://programmingarehard.com/2014/03/17/behat-and-selenium-in-vagrant.html
echo "\r\nUpdating system ...\r\n"
sudo apt-get update
# Create folder to place selenium in
@sebmarkbage
sebmarkbage / JSXSpreadAttributes.md
Last active Jan 17, 2019
JSX Spread Attributes
View JSXSpreadAttributes.md

JSX Spread Attributes

If you know all the properties that you want to place on a component a head of time, it is easy to use JSX:

  var component = <Component foo={x} bar={y} />;

Mutating Props is Bad, mkay

@markguinn
markguinn / CreateViewForClass.php
Last active Jan 5, 2017
Create MySQL view for multi-table Silverstripe DataObject
View CreateViewForClass.php
<?php
/**
* Creates a Flat table view for a given class
* @author Mark Guinn <mark@adaircreative.com>
* @date 06.13.2014
*/
class CreateViewForClass extends BuildTask
{
protected $title = 'DEV: Flat View for Class';
protected $description = 'Use class=XXXX to create a flat view of all the tables that make up a given class';
@shawnrice
shawnrice / skeleton-daemon.sh
Created Apr 19, 2014
A template to write a quick daemon as a bash script
View skeleton-daemon.sh
#!/bin/sh
# This is a skeleton of a bash daemon. To use for yourself, just set the
# daemonName variable and then enter in the commands to run in the doCommands
# function. Modify the variables just below to fit your preference.
daemonName="DAEMON-NAME"
pidDir="."
pidFile="$pidDir/$daemonName.pid"
@ryanwachtl
ryanwachtl / SilverStripe Foundation HtmlEditorConfig
Last active Dec 21, 2015
HtmlEditorConfig for SilverStripe Foundation Theme. Also sets up a minimal, single line toolbar.
View SilverStripe Foundation HtmlEditorConfig
HtmlEditorConfig::get('cms')->setOptions(array(
"skin" => "default",
"style_formats" => array(
array(
"title" => "Lead",
"selector" => "p",
"classes" => "lead"
),
array(
"title" => "Subheader",
@phptek
phptek / ss-upgrade.sh
Last active Oct 11, 2015 — forked from stojg/ss-upgrade.sh
Search and replace for SS 3.0 upgrade [beta]
View ss-upgrade.sh
#!/bin/bash
#
# ss-upgrader.sh
#
# INTRODUCTION
#
# There are some threads on the SS forums that describe the techdocs for upgrading a 2.4 site to 3.x as being too technical. Mainly from content authors who
# also happen to be site maintainers - they are not coders.
# The aim of this script is to therefore to automate - in as much as this is possible in a user-configured, open-source software project - to help those new to
# SS3 upgrade from 2.x as smoothly as possible.
@jphorn
jphorn / firebuglite-ios.js
Created Dec 4, 2011
Firebug LITE for iOS
View firebuglite-ios.js
javascript:(function(F,i,r,e,b,u,g,L,I,T,E){if(F.getElementById(b))return;E=F[i+'NS']&&F.documentElement.namespaceURI;E=E?F[i+'NS'](E,'script'):F[i]('script');E[r]('id',b);E[r]('src',I+g+T);E[r](b,u);(F[e]('head')[0]||F[e]('body')[0]).appendChild(E);E=new%20Image;E[r]('src',I+L);})(document,'createElement','setAttribute','getElementsByTagName','FirebugLite','4','firebug-lite.js','releases/lite/latest/skin/xp/sprite.png','https://getfirebug.com/','#startOpened');
You can’t perform that action at this time.