Skip to content

Instantly share code, notes, and snippets.

View Kikobeats's full-sized avatar
👋
say hi

Kiko Beats Kikobeats

👋
say hi
View GitHub Profile
@stt
stt / sqlaus.jison
Created October 18, 2011 21:15
Jison rules for turning boolean expressions into SQL clauses
/*
* Jison rules for parsing simple boolean expressions
* (c)2011, <samuli@tuomola.net>
*
* Usage: npm install jison && jison sqlaus.jison && node test-sqlaus.js
*
* Meant primarily for generating SQL clauses for m:m table structure.
*
* Depends on shared scope to provide..
* functions:
@jaysonrowe
jaysonrowe / FizzBuzz.js
Created January 11, 2012 01:39
FizzBuzz JavaScript solution
for (var i=1; i <= 20; i++)
{
if (i % 15 == 0)
console.log("FizzBuzz");
else if (i % 3 == 0)
console.log("Fizz");
else if (i % 5 == 0)
console.log("Buzz");
else
console.log(i);
@liamcurry
liamcurry / gist:2597326
Created May 4, 2012 19:56
Vanilla JS vs jQuery

Moving from jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
@iros
iros / API.md
Created August 22, 2012 14:42
Documenting your REST API

Title

<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>

  • URL

    <The URL Structure (path only, no root url)>

  • Method:

@zachharkey
zachharkey / _media-object.scss
Last active December 15, 2015 07:29 — forked from Victa/_media-object.scss
A SASS(SCSS) Mixin to easily apply the [OOCSS Media object][stubbornella] to any component. Implements the code from this [Gist][github] which I forked from [Victa][github 2] to provide more SMACSS friendly default class names and reordered the arguments in based on my own frequency of use. [See it in action][codepen] [github]: https://gist.gith…
// OOCSS Media Object
@mixin media-object($img: '.media-img', $bd: '.media-bd', $margin:10px, $position: left, $formatting-context: 'overflow') {
@include pie-clearfix; // or extend a .clearfix class
#{unquote($bd)} {
@if $formatting-context == 'overflow' {
overflow:hidden;
} @else {
display:table-cell;
width:10000px;
*width:auto;

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style

A Modest Proposal: Events

Sails.js v0.10

Events are a new feature of the Sails core as of 0.9.

Core events

Lifecycle

@aras-p
aras-p / preprocessor_fun.h
Last active April 12, 2024 17:24
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
@sindresorhus
sindresorhus / np.sh
Last active December 11, 2022 21:26
shell function for publishing node modules with some goodies
# npm publish with goodies
# prerequisite: `npm install -g trash`
# `np` with an optional argument `patch`/`minor`/`major`/`<version>`
# defaults to `patch`
np() {
trash node_modules &>/dev/null;
git pull --rebase &&
npm install &&
npm test &&
npm version ${1:-patch} &&
@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active April 20, 2024 16:52
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!






\