Skip to content

Instantly share code, notes, and snippets.

💻
Learning me some Golang

Colin O'Dell colinodell

💻
Learning me some Golang
Block or report user

Report or block colinodell

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
View solutions.md

My Solutions for https://returntrue.win

  1. !0
  2. str_rot13
  3. !0
  4. 0
  5. 🤷 (any emoji should work)
  6. ???
  7. (object)[!0]
  8. new class extends Bar{}
View .gitconfig
[alias]
p = "!git pull --ff-only"
fixup = !sh -c 'REV=$(git rev-parse $1) && git commit --fixup $@ && git rebase -i --autostash --autosquash $REV^' -
cleanup = "!git branch --merged | grep -v -P '^\\*|master|develop' | xargs -n1 -r git branch -d"
children = "!bash -c 'c=${1:-HEAD}; set -- $(git rev-list --all --not \"$c\"^@ --children | grep $(git rev-parse \"$c\") ); shift; echo $1' -"
@colinodell
colinodell / data.json
Last active Oct 30, 2017
Elephpants in JSON format
View data.json
{
"2014-11-27-black-amsterdamphp": {
"name": "MurPHPy",
"variation": "AmsterdamPHP",
"species": "Elephpas hypertextus amstelodami",
"color": "black",
"sponsor": "AmsterdamPHP",
"reverse": "AmsterdamPHP logo",
"photos": [
{
@colinodell
colinodell / patch-01-requirements.diff
Created May 22, 2017
Custom open-wave build for Home Assistant 0.45 on Docker
View patch-01-requirements.diff
diff --git a/requirements_all.txt b/requirements_all.txt
index 6141e3d..2da4ce0 100644
--- a/requirements_all.txt
+++ b/requirements_all.txt
@@ -695,9 +695,6 @@ python-vlc==1.1.2
# homeassistant.components.wink
python-wink==1.2.4
-# homeassistant.components.zwave
-python_openzwave==0.4.0.31
@colinodell
colinodell / Dockerfile
Created Oct 12, 2017
Home Assistant with up-to-date Z-Wave files
View Dockerfile
FROM homeassistant/home-assistant:latest
RUN set -e && \
apt update && \
apt install -y unzip && \
wget -O /tmp/ozw.zip https://github.com/OpenZWave/open-zwave/archive/master.zip && \
cd /tmp && \
unzip /tmp/ozw.zip && \
cp -R /tmp/open-zwave-master/config/* /usr/local/lib/python3.6/site-packages/python_openzwave/ozw_config/ && \
rm -rf /tmp/ozw.zip /tmp/open-zwave-master && \
@colinodell
colinodell / changes.diff
Last active Aug 19, 2017
openzwave "dev" branch support for HA 0.50.2+
View changes.diff
diff --git a/Dockerfile b/Dockerfile
index f0d5acc..fa6e914 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -31,6 +31,12 @@ COPY requirements_all.txt requirements_all.txt
RUN pip3 install --no-cache-dir -r requirements_all.txt && \
pip3 install --no-cache-dir mysqlclient psycopg2 uvloop cchardet
+# Install python-openzwave
+RUN pip3 install --upgrade cython==0.24.1 && \
View TargetBlankLinkProcessor.php
<?php
class TargetBlankLinkProcessor implements DocumentProcessorInterface
{
/**
* @param Document $document
*
* @return void
*/
public function processDocument(Document $document)
@colinodell
colinodell / .gitignore
Last active Mar 13, 2017
Standard Magento .gitignore
View .gitignore
# Don't include any temporary files and other unimportant things
*.log
*.bak
*.bak.*
*.thumbs/
.DS_Store
Thumbs.db
.svn
*.swp
@colinodell
colinodell / CustomParagraphRenderer.php
Created Feb 6, 2017
CommonMark - Overriding default renderers
View CustomParagraphRenderer.php
<?php
use League\CommonMark\Block\Element\AbstractBlock;
use League\CommonMark\ElementRendererInterface;
class CustomParagraphRenderer implements BlockRendererInterface
{
public function render(AbstractBlock $block, ElementRendererInterface $htmlRenderer, $inTightList = false)
{
return $htmlRenderer->renderInlines($block->children());
@colinodell
colinodell / portVarKeywords.php
Last active Sep 28, 2016 — forked from nikic/portAlternativeTags.php
Tool for changing "var" keywords to "public" in PHP
View portVarKeywords.php
<?php
/*
* Note: This script will directly modify the .php files in the given directory.
* It is assumed that the code is under version control, so you can easily review
* the changes using `git diff` or similar.
*/
function usageError() {
die("Usage: php portVarKeywords.php dir/\n");
You can’t perform that action at this time.