Skip to content

Instantly share code, notes, and snippets.

@culttm
culttm / EntityBase.php
Created December 3, 2017 22:00 — forked from lelledaniele/EntityBase.php
symfony doctrine updatedAt createdAt updated_at created_at fields timestamp
<?php
namespace AppBundle\Mapping;
use Doctrine\ORM\Mapping as ORM;
use DateTime;
/**
* Class EntityBase
*
@culttm
culttm / .manifest
Created October 10, 2017 22:04
chrome extension using a content script to access the `window` object
{
"content_scripts": [
{
"matches": ["http://*/*", "https://*/*"],
"js": ["inject.js"],
"all_frames": true
}
],
"web_accessible_resources": [
"content.js"
@culttm
culttm / manifest.json
Created September 17, 2017 19:13 — forked from greatghoul/manifest.json
Chrome Extension Sample - detect if an extension is installed.
{
"name": "Detect if an extension installed",
"description": "Detect if an extension installed",
"version": "0.1",
"manifest_version": 2,
"permissions": [
"management"
],
"browser_action": {
"default_popup": "popup.html"
@culttm
culttm / interceptors.js
Created September 11, 2017 06:27 — forked from Rebolon/interceptors.js
#vuejs : vue-resource cache plugin with PouchDB
/**
* allow to cache response and/or to listen on newRequest event
*
* for cache system, it's freely adapted from https://github.com/pagekit/vue-resource/issues/252 @airtonix sample
*/
export class HttpInterceptors {
_cache
constructor (Vue, ttlInHours) {
@culttm
culttm / .babelrc
Created April 20, 2017 07:33 — forked from thejmazz/.babelrc
async/await with webpack+babel
{
"presets": ["es2015"],
"plugins": ["transform-async-to-generator"]
}
@culttm
culttm / Sublime Text 3 Build 3103 License Key - CRACK
Created March 15, 2017 06:17
Sublime Text 3 Build 3103 License Key - CRACK
I use the first
—– BEGIN LICENSE —–
Michael Barnes
Single User License
EA7E-821385
8A353C41 872A0D5C DF9B2950 AFF6F667
C458EA6D 8EA3C286 98D1D650 131A97AB
AA919AEC EF20E143 B361B1E7 4C8B7F04
@culttm
culttm / Redux4Ways
Created February 25, 2017 10:40 — forked from adamTrz/Redux4Ways
//App.js:
...
connect(mapStateToProps, { fetchData })(App)
//ActionCreator:
export const fetchData = () => (dispatch) => {
dispatch({type: FETCHING_DATA})
getPeople()
.then(data => dispatch({type: FETCHING_DATA_SUCCESS, payload: data}))
.catch(er => dispatch({type: FETCHING_DATA_FAILURE}))
@culttm
culttm / introrx.md
Created February 24, 2017 18:23 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@culttm
culttm / array.reduce-polyfill.js
Created August 12, 2016 09:39 — forked from lski/array.reduce-polyfill.js
Array.reduce polyfill created by MDN, made available to use with NPM
// Production steps of ECMA-262, Edition 5, 15.4.4.21
// Reference: http://es5.github.io/#x15.4.4.21
if (!Array.prototype.reduce) {
Array.prototype.reduce = function(callback /*, initialValue*/) {
'use strict';
if (this == null) {
throw new TypeError('Array.prototype.reduce called on null or undefined');
}
if (typeof callback !== 'function') {
throw new TypeError(callback + ' is not a function');
@culttm
culttm / README.md
Created July 14, 2016 07:36 — forked from jonathantneal/README.md
SASS @font-face mixin

Font Face

A mixin for writing @font-face rules in SASS.

Usage

Create a font face rule. Embedded OpenType, WOFF2, WOFF, TrueType, and SVG files are automatically sourced.

@include font-face(Samplino, fonts/Samplino);