Skip to content

Instantly share code, notes, and snippets.

View ADMAN amp tag
<amp-ad width="300" height="250"
type="adman"
data-ws="17342"
data-s="300x250"
data-host="talos.adman.gr">
</amp-ad>
@phaistonian
phaistonian / reveal_side_bar_st.json
Created Jan 27, 2016
Shortcut to reveal in sublime side_bar
View reveal_side_bar_st.json
{ "keys": ["alt+s"], "command": "reveal_in_side_bar"}
View webpack.config.js
var Webpack = require('webpack');
var path = require('path');
var entry = require('./webpack-entry');
// Prepend local dev server
for (var i in entry) {
entry[i] = ['webpack-dev-server/client?http://local.bestprice.gr:3000', 'webpack/hot/dev-server']
.concat(entry[i]);
}
@phaistonian
phaistonian / MatrixRounder.js
Last active Oct 12, 2015
Deal with sub-pixels the JS way
View MatrixRounder.js
function attachRounder (element) {
window.addEventListener('resize', () => makeRound(element));
makeRound(element);
}
function makeRound (element) {
let transform = window.getComputedStyle(element, null).getPropertyValue('transform');
if (transform.indexOf('matrix') !== -1) {
element.style.transform = transform.replace(/[\d\.]+/gi, function (match) { return Math.round(match);});
}
View dummy
hello = () => {
var lala = 1;
something();
}
View php.ini
short_open_tag=On
error_reporting = E_ALL & ~E_NOTICE;
View .gitignore
# Misc related to npm and webpack
node_modules
build
dist
webpack-stats.json
npm-debug.log
# Sublime related - just in case
###################
sublime-*
@phaistonian
phaistonian / firesync.js
Last active Nov 10, 2015
A Redux middleware to broadcast state (actions + data) using Firebase (http://d.pr/v/13oMK)
View firesync.js
import Rebase from 're-base';
const endPoint = 'actions';
const firebaseUrl = 'https://firesync.firebaseio.com';
const client = String(Date.now() + Math.random() * 100);
const data = [];
let initiated = false;
const base = Rebase.createClass(firebaseUrl);
function firesync (store) {
View (my) Sublime Text 3 options
{
"bold_folder_labels": true,
"build_on_save": false,
"caret_style": "phase",
"close_windows_when_empty": true,
"color_scheme": "Packages/Material Theme/schemes/Material-Theme.tmTheme",
"default": "Default.sublime-theme",
"detect_indentation": false,
"draw_indent_guides": true,
"draw_minimap_border": true,