Skip to content

Instantly share code, notes, and snippets.

View inoas's full-sized avatar
🏠
Working from home

inoas

🏠
Working from home
View GitHub Profile
@inoas
inoas / fontStacks.css
Created November 23, 2017 19:22 — forked from kkemple/fontStacks.css
Font Stacks with all browser based fonts
/* Times New Roman-based stack */
font-family: Cambria, "Hoefler Text", Utopia, "Liberation Serif", "Nimbus Roman No9 L Regular", Times, "Times New Roman", serif;
/* Modern Georgia-based serif stack */
font-family: Constantia, "Lucida Bright", Lucidabright, "Lucida Serif", Lucida, "DejaVu Serif", "Bitstream Vera Serif", "Liberation Serif", Georgia, serif;
/* Traditional Garamond-based serif stack */
font-family: "Palatino Linotype", Palatino, Palladio, "URW Palladio L", "Book Antiqua", Baskerville, "Bookman Old Style", "Bitstream Charter", "Nimbus Roman No9 L", Garamond, "Apple Garamond", "ITC Garamond Narrow", "New Century Schoolbook", "Century Schoolbook", "Century Schoolbook L", Georgia, serif;
/* Helvetica/Arial-based sans serif stack */
@inoas
inoas / .eslintrc.js
Created September 1, 2017 16:44 — forked from nkbt/.eslintrc.js
Strict ESLint config for React, ES6 (based on Airbnb Code style)
{
"env": {
"browser": true,
"node": true,
"es6": true
},
"plugins": ["react"],
"ecmaFeatures": {
@inoas
inoas / brew-perms.sh
Created June 30, 2017 22:58 — forked from jaibeee/brew-perms.sh
Configure homebrew permissions to allow multiple users on MAC OSX. Any user from the admin group will be able to manage the homebrew and cask installation on the machine.
#!/bin/sh
# Configure homebrew permissions to allow multiple users on MAC OSX.
# Any user from the admin group will be able to manage the homebrew and cask installation on the machine.
# allow admins to manage homebrew's local install directory
chgrp -R admin /usr/local
chmod -R g+w /usr/local
# allow admins to homebrew's local cache of formulae and source files
chgrp -R admin /Library/Caches/Homebrew
@inoas
inoas / IsUniqueInContext.php
Created March 8, 2017 15:10
CakePHP3 IsUniqueInContextRule
<?php
namespace App\Model\Rule;
use Cake\Datasource\EntityInterface;
use Cake\ORM\TableRegistry;
/**
* Checks if a list of fields from an entity are unique in the table given a context where they can be duplicates
*/
class IsUniqueInContext
<?php
$xmlView = new XmlView;
$xmlView->templatePath = 'Service';
$xmlView->template = 'api.xml'; // Template/Service/xml/api.xml.ctp
$xmlView->set('foo', 'bar');
var_dump($xmlView->render());
@inoas
inoas / PHPtoICS.php
Created January 9, 2017 16:30 — forked from jakebellacera/ICS.php
A convenient script to generate iCalendar (.ics) files on the fly in PHP.
<?php
// Variables used in this script:
// $summary - text title of the event
// $datestart - the starting date (in seconds since unix epoch)
// $dateend - the ending date (in seconds since unix epoch)
// $address - the event's address
// $uri - the URL of the event (add http://)
// $description - text description of the event
// $filename - the name of this file for saving (e.g. my-event-name.ics)
//
@inoas
inoas / Git checkout remote branch
Created November 10, 2016 14:45 — forked from markSci5/Git checkout remote branch
Git checkout remote branch
//To fetch a branch, you simply need to:
git fetch origin
//This will fetch all of the remote branches for you. With the remote branches
//in hand, you now need to check out the branch you are interested in, giving
//you a local working copy:
git checkout -b test origin/test