Skip to content

Instantly share code, notes, and snippets.

View alexwilson's full-sized avatar
🎧
i only speak techno.

Alex Wilson alexwilson

🎧
i only speak techno.
View GitHub Profile
@alexwilson
alexwilson / fanfictionnet.js
Created September 29, 2014 10:23
Select text from FanFiction.net
$("#storytextp").css{
'-webkit-touch-callout': 'text',
'-webkit-user-select': 'text',
'-khtml-user-select': 'text',
'-moz-user-select': 'text',
'-ms-user-select': 'text',
'user-select': 'text'
};
@alexwilson
alexwilson / csvgen.php
Created September 29, 2014 10:26
Magento CSV generator
<?php
class csvgen {
public $count;
private $cwd;
private $products;
private $dateTime;
public function __construct() {
@alexwilson
alexwilson / Skype for Web theme
Last active August 29, 2015 14:17
Change formatting.
@-moz-document url-prefix("https://web.skype.com/en/")
{
.swx.themeBlue,
.swx .themeBlue,
.swx .themeWhite.side .recent.active
{
background-color: #cccccc !important;
fill: #00aff0 !important;
color: #ffffff !important;
@alexwilson
alexwilson / devServer.js
Created January 22, 2016 12:39
Is this doing it right?
import webpack from "webpack";
import WebpackDevServer from "webpack-dev-server";
import config from "./webpack.config";
const host = 'localhost';
const port = 9080;
config.devtool = 'eval';
config.entry.push('webpack-dev-server/client?http://'+host+':'+port);
config.entry.push('webpack/hot/only-dev-server');
@alexwilson
alexwilson / ezpublish.yml
Last active March 10, 2016 08:34
How to use literal HTML in eZ Platform
## Path can point wherever, this currently assumes that you're whacking everything in /ezpublish/
## but really this should be in a bundle.
system:
some_siteaccess_name:
fieldtypes:
ezxml:
custom_tags: [{path: %kernel.root_dir%/Resources/views/fields/ezxml/fields.xsl}]
@alexwilson
alexwilson / ga.js
Last active May 20, 2016 20:46
ga.js-style wrapper for compatibility with Google Tag Manager
(function() {
var _prefix = 'ga';
// Ensure we have a GTM Data Layer to push to.
window['dataLayer'] = window['dataLayer'] || {};
// Instead of overdeclaring _gaq, only attempt to polyfill if it doesn't already exist.
if (window['_gaq'] === 'undefined '|| typeof window['_gaq'] !== 'object') {
window['_gaq'] = {};
@alexwilson
alexwilson / clean-docker.sh
Created August 6, 2016 20:12
Docker cleanup
#!/bin/sh
# Sourced from https://github.com/jfrazelle/dotfiles/blob/a7fd3df6ab423e6dd04f27727f653753453db837/.dockerfunc#L8-L11
docker rm -v $(docker ps --filter status=exited -q 2>/dev/null) 2>/dev/null
docker rmi $(docker images --filter dangling=true -q 2>/dev/null) 2>/dev/null
@alexwilson
alexwilson / EzPublishLegacyConfigurationMapper.php
Last active September 2, 2016 16:38
EzPublish Legacy Configuration Mapper
<?php
namespace EzPublish\AppBundle\EventListener;
use eZ\Publish\Core\MVC\Legacy\Event\PreBuildKernelEvent;
use eZ\Publish\Core\MVC\Legacy\LegacyEvents;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
class LegacyConfigurationMapper implements EventSubscriberInterface
{
/**
@alexwilson
alexwilson / matryoshka.scss
Last active September 4, 2016 23:03
Matryoshka Sass micro-framework (nestable)
/**
* Sass import for generating nestable containers.
* The "rest" of the grid is just flex boxes.
*/
*, :after, :before {
box-sizing: inherit;
}
html, body {
padding: 0;
margin: 0;
@alexwilson
alexwilson / keybase.md
Created October 18, 2016 10:19
Keybase Verification

Keybase proof

I hereby claim:

  • I am antoligy on github.
  • I am antoligy (https://keybase.io/antoligy) on keybase.
  • I have a public key whose fingerprint is B5E9 8AE7 DDB8 B82E B375 E2CF DE20 36C6 B4D2 F38E

To claim this, I am signing this object: