Skip to content

Instantly share code, notes, and snippets.

View weerd's full-sized avatar

Diego Lorenzo weerd

View GitHub Profile
@loonies
loonies / 1_phpunit-api.md
Last active January 19, 2024 07:34
PHPUnit Cheat Sheet

PHPUnit API reference

  • version 3.6

TODO

Check those constraints:

$this->anything()
@coolaj86
coolaj86 / how-to-publish-to-npm.md
Last active June 9, 2024 23:19
How to publish packages to NPM

Getting Started with NPM (as a developer)

As easy as 1, 2, 3!

Updated:

  • Aug, 08, 2022 update config docs for npm 8+
  • Jul 27, 2021 add private scopes
  • Jul 22, 2021 add dist tags
  • Jun 20, 2021 update for --access=public
  • Sep 07, 2020 update docs for npm version
@JeffreyWay
JeffreyWay / gist:1525217
Created December 27, 2011 21:29
Instant Server for Current Directory
alias server='open http://localhost:8000 && python -m SimpleHTTPServer'
@ziadoz
ziadoz / awesome-php.md
Last active May 10, 2024 15:06
Awesome PHP — A curated list of amazingly awesome PHP libraries, resources and shiny things.
@lg0
lg0 / markdown.xml
Created April 10, 2012 19:58
Markdown Syntax Highlighting for Sublime text 2
<!-- copy this to YOUR_THEME.tmTheme-->
<dict>
<key>name</key>
<string>diff: deleted</string>
<key>scope</key>
<string>markup.deleted</string>
<key>settings</key>
<dict>
<key>background</key>
<string>#EAE3CA</string>
@loonies
loonies / git-cheat-sheet.md
Last active December 22, 2021 16:38
Git Cheat Sheet

Git Cheat Sheet

Although there are enough resources on the web about Git, I will keep this one for my own reference. Minimal Git version required 1.7.2.

TOC

@jlong
jlong / uri.js
Created April 20, 2012 13:29
URI Parsing with Javascript
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"
@EpocSquadron
EpocSquadron / gist:2936983
Last active October 6, 2015 04:37
Web Project Best Practices

Web Project Best Practices

Proper Gitignoring

When starting a project, or joining a project that hasn't done this yet, the first thing you should do is set up proper gitignore files. There should be a master gitignore in the project root based on the h5bp master gitignore, and a cache dir specific gitignore in each cache directory. Without proper gitignoring, junk files tend to find their way into commits and removing them becomes a pain, as everyone gets modified/removed conflicts forever after. The reasoning behind using a gitignore file for each cache folder separately instead of including path/to/cache_dir/* in the master gitignore is that git is inconsistent in whether the folder itself is actually stored in the remote git repo. It is most consistent to have gitignores ignoring all but themselves in each cache directory. Then that directory must always be in the remote repo in order to contain the .gitignore file.

@kaelig
kaelig / input.scss
Created November 21, 2012 22:41 — forked from blackfalcon/01_SassMeister.sass
Extending placeholder selectors within media queries
%myclass {
color: blue;
@media (min-width: 600px) {
background: red;
}
@media (min-width: 800px) {
font-size: 28px;
}
}