Skip to content

Instantly share code, notes, and snippets.

💭
Looking for collaborators.

Richard Eriksson sillygwailo

💭
Looking for collaborators.
Block or report user

Report or block sillygwailo

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 break-out-of-sniply-frames.user.js
// ==UserScript==
// @name Break out of Snip.ly frames
// @version 0.1
// @include http://snip.ly/*
// @author Richard Eriksson
// ==/UserScript==
var current_hash = window.location.hash;
var destination_url = current_hash.slice(1);
// Thank you, Stack Overflow. http://stackoverflow.com/a/18970172/300278
View ConfigFormExampleConfigForm.php
<?php
/**
* @file
* Contains \Drupal\configform_example\Form\ConfigFormExampleConfigForm.
*/
namespace Drupal\configform_example\Form;
use Drupal\Core\Form\ConfigFormBase;
@sillygwailo
sillygwailo / renew-le-ssl.yml
Last active Mar 14, 2016
Ansible playblook to renew Let's Encrypt SSL
View renew-le-ssl.yml
---
- hosts: YOUR_HOST_HERE
tasks:
- name: Stop Apache
service: name=httpd state=stopped
become: yes
become_user: root
- name: Renew Let's Encrypt certificate
command: ./letsencrypt-auto --agree-dev-preview --renew-by-default -t -d YOUR_DOMAIN_HERE -d YOUR_WWW_SUBDOMAIN_AND_DOMAIN_HERE --server https://acme-v01.api.letsencrypt.org/directory auth
@sillygwailo
sillygwailo / demobilizer-vancouver-sun-cbc-links.patch
Created Apr 8, 2015
Add CBC and Vancouver Sun links to the Demobilizer Safari Extension
View demobilizer-vancouver-sun-cbc-links.patch
View instructions.md

Custom Twitter Stylesheet

Craig Mod does a bigger overhaul with Twitter for Minimalists, but this will only do the following:

  • Hides promoted tweets and trends
  • Hides the useless “Expand” link that appears under every tweet
  • Tones down the blue conversation line to a barely-visible gray
  • Hides all numbers

You can add this CSS in Safari with this extension. The URL to target is twitter.com/*.

@sillygwailo
sillygwailo / Gruntfile.js
Created Mar 3, 2015
questions.justagwailo.com Grunt deployment and notification
View Gruntfile.js
module.exports = function(grunt) {
grunt.initConfig({
notify: {
surge: {
options: {
title: 'questions.justagwailo.com',
message: 'Deployment complete.',
}
},
},
@sillygwailo
sillygwailo / gist:20c18e877f1d0569e954
Last active Aug 29, 2015
Compiling a forked Node.js module written in CoffeeScript
View gist:20c18e877f1d0569e954
  1. I have a fork of a Node.js module on GitHub that is a depenency of an app.
  2. That module is written in CoffeeScript. When 'npm install' downloads it, it doesn't compile the module. This is a problem when deploying the app to Heroku, because I can't compile it when deploying to Heroku.
  3. Furthermore, compiling the module has its own depenencies. The dependencies need to be installed before it can be installed.
  4. If I manually run 'npm install' in the forked module's directory inside node_modules, then 'grunt prepublish', everything will work.
  5. I need to automate step #4 when installing the app. How do I do that?

The app in question is https://github.com/sillygwailo/Slack-Twitter If you run npm install in that directory, the slack-client module will not get compiled.

A Solution?

@sillygwailo
sillygwailo / daringfireball-no-caps.css
Last active Aug 29, 2015
Sentence case in Linked List titles and Fireball sub-headings on Daring Fireball
View daringfireball-no-caps.css
/* If you know how to edit User CSS using a browser plugin, use http://daringfireball.net/* as the URLs for this CSS. */
dt {
text-transform: none !important;
font-family: Verdana, "Bitstream Vera Sans", sans-serif !important;
}
h2 {
font-size: 1.25em !important;
text-transform: none !important;
}
View slack-client-minimal-example.js
/*
1. npm install slack-client
2. Add a bot to Slack. https://YOURDOMAIN.slack.com/services/new/bot
3. Replace the YOUR_TOKEN_HERE with the token from the bot.
4. Invite the bot to a channel to monitor.
*/
var Slack = require('slack-client');
var options = {
@sillygwailo
sillygwailo / known-centos-7.txt
Last active Aug 29, 2015
Installing Known on Centos 7
View known-centos-7.txt
yum install httpd mariadb mariadb-server mod_php php-xmlrpc unzip php-pdo php-mysql php-xml php-gd php-mbstring
systemctl start mariadb.service
systemctl enable mariadb.service
mysql_secure_installation
systemctl start httpd.service
systemctl enable httpd.service
You can’t perform that action at this time.