Skip to content

Instantly share code, notes, and snippets.

Project organization

Here is how I prefer to organize projects:

┌─ _dist/
├─ assets/
├─ content/
├─ data/
@itayw
itayw / HISTORY.md.js
Last active August 12, 2020 17:16
Generate HISTORY.md from GitHub Milestones and Tags
/**
Build HISTORY.md from your GitHub Tags and Milestones.
Note: Tag and Milestone name/title MUST MATCH!
**/
var
GitHubApi = require('github'),
async = require('async'),
fs = require('fs'),
@plentz
plentz / nginx.conf
Last active April 24, 2024 11:15
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@seanmtracey
seanmtracey / ES6 Version
Last active December 22, 2015 21:59
Random color generation for all DOM elements so you can see where that pesky whitespace is coming from.
m=Math.random,v=255;Array.from(document.querySelectorAll("*")).forEach(e=>{e.style.background=`rgb(${m()*v|0},${m()*v|0},${m()*v|0})`})
@jhogue
jhogue / gist:6370800
Last active December 21, 2015 21:49
Diagnostic CSS rules for finding poorly formed, non-semantic, inaccessible markup on links and buttons, mostly. For more diagnostics, check out http://www.tomato-root.com/sandbox/holmes/ and https://github.com/diagnosticss/diagnosticss
@mixin heydon_rules {
// Adapted from http://coding.smashingmagazine.com/2013/08/20/semantic-css-with-intelligent-selectors/
// I removed the Comic Sans font declaration because, well, I really can't stand it, even in this context
%uglystyle {
display: block !important;
background: pink !important;
padding: 0.5em !important;
color: #000 !important;
@blackfalcon
blackfalcon / sassJunkDrawer.md
Last active March 23, 2022 20:09
Clean out your Sass junk-drawer

by Dale Sande

CSS has had a long and sordid past. A developer never sets out with the goal of making a complete and total mess of things. Their intention is not to build something that is practically illegible, impractical to maintain and is limited in scale. But somehow, this is where many inevitably end up. Luckily, all is not lost. With some simple strategies, organizational methods and out-of-the box tools, we can really help get that junk-drawer inline.

For many of us getting started with Sass, at one time or another have created a junk-drawer of files. For most, this was a rookie mistake, but for others, this is a continuing issue with our architecture and file management techniques. Sass doesn't come with any real rules for file management so developers are pretty much left to their own devices.

Large CSS files and increased complexity

CSS started out with very simple intentions, but as [tableless web design][1.1] began to really take a foothold, o

@anchetaWern
anchetaWern / laravel-ums.markdown
Created December 6, 2012 11:14
Building a User Management System in Laravel

There's no shortage of good resources for learning laravel. So instead of the usual introductory tutorial were just gonna learn Laravel by building a project from scratch and that's gonna be a User Management System.

I don't know if my definition of a User Management System is correct but here's my idea of what's it's capable of doing:

  • Register Roles
  • Register Users
  • Update Users
@shakyShane
shakyShane / Gallery.php
Last active November 8, 2017 15:35
Create a simpe PHP Photo Gallery with Pagination
@lucasdavila
lucasdavila / 1_ubuntu_terminal_command
Last active February 21, 2024 16:26
Installing Source Code Pro fonts in ubuntu
# to execute this gist, run the line bellow in terminal
\curl -L https://raw.github.com/gist/3875946/install_source_code_pro.sh | sh