Skip to content

Instantly share code, notes, and snippets.

@caraya
caraya / article.tex
Last active Feb 23, 2019
Latex example to go with article
View article.tex
\documentclass[12pt, letterpaper, titlepage]{article}
% font size could be 10pt (default), 11pt or 12 pt
% paper size could be letterpaper (default), legalpaper, executivepaper,
% a4paper, a5paper or b5paper
% side could be oneside (default) or twoside
% columns could be onecolumn (default) or twocolumn
% graphics could be final (default) or draft
%
% titlepage could be notitlepage (default) or titlepage which
% makes an extra page for title
View README.md
@caraya
caraya / lettering.html
Created Nov 1, 2018 — forked from adactio/lettering.html
A quick'n'dirty way of doing some lettering.js stuff without jQuery.
View lettering.html
<!DOCTYPE html>
<html lang="en">
<head>
<title>Test</title>
<style>
.slogan span:nth-child(odd) {
color: red;
}
</style>
</head>
View install.sh
#!/bin/env bash
echo "\n\n Checking if package.json exists"
if [ -f package.json ]
then
echo "\n\n package.json exists."
else
echo "\n\n package.json doesn't exists... creating"
npm init --yes
fi
@caraya
caraya / package.json
Created Apr 19, 2018 — forked from surma/package.json
Boilerplate for quick one-off TypeScript projects. Just run `npm start`
View package.json
{
"name": "tsquickstart",
"version": "1.0.0",
"description": "Boilerplate for quick one-off TypeScript projects. Just run `npm start`",
"scripts": {
"init": "test -f tsconfig.json || (tsc --init -t ESNext -m ESNext && npm install)",
"start": "npm run init && concurrently \"npm run watch\" \"npm run serve\"",
"serve": "http-server",
"watch": "tsc -p . --watch",
"build": "tsc -p ."
@caraya
caraya / list.md
Last active Mar 9, 2018
list of javascript frameworks
View list.md
@caraya
caraya / sw.js
Last active Feb 27, 2018
service worker to cache fonts
View sw.js
importScripts(
'https://storage.googleapis.com/workbox-cdn/releases/3.0.0-beta.0/workbox-sw.js '
);
if (workbox) {
workbox.routing.registerRoute(
/.*\.(?:woff2,woff,ttf,otf)/,
workbox.strategies.cacheFirst({
cacheName: 'font-cache',
plugins: [
View Principles-of-Adult-Behavior.md

Principles of Adult Behavior

  1. Be patient. No matter what.
  2. Don’t badmouth: Assign responsibility, not blame. Say nothing of another you wouldn’t say to him.
  3. Never assume the motives of others are, to them, less noble than yours are to you.
  4. Expand your sense of the possible.
  5. Don’t trouble yourself with matters you truly cannot change.
  6. Expect no more of anyone than you can deliver yourself.
  7. Tolerate ambiguity.
  8. Laugh at yourself frequently.
View index-template.html
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Globalize App example using Webpack</title>
</head>
<body>
<h1>Globalize App example using Webpack</h1>