Skip to content

Instantly share code, notes, and snippets.

View tkrugg's full-sized avatar
⌨️
typing...

Youcef Mammar tkrugg

⌨️
typing...
View GitHub Profile
@tkrugg
tkrugg / index.html
Created November 9, 2016 21:02
rWOvvo
<div class="square"></div>
<div class="square"></div>
<div class="square"></div>
<div class="square small"></div>
<br>
<div class="square tightened-down"></div>
<br>
<div class="square invisible tightened-up tightened-down"></div>
<div class="square tightened-up tightened-down"></div>
<div class="square invisible tightened-up tightened-down"></div>
@tkrugg
tkrugg / gbwyzM.markdown
Created December 30, 2014 13:51
Flat icons
@tkrugg
tkrugg / dropdown.html
Last active August 29, 2015 14:12
Different option for implementing dropdown
<!-- option 1
currently implemented -->
<d-dropdown>
<button is=d-toggle-button>Menu &#9207; </d-toggle-button>
<d-dropdown-menu>
<a href="#entry-1" is=d-dropdown-entry>entry 1</a>
<a href="#entry-2" is=d-dropdown-entry>entry 2</a>
</d-dropdown-menu>
</d-dropdown>
@tkrugg
tkrugg / environmentTypes.json
Created December 18, 2014 14:45
Environments available on saucelab. It was curled from http://saucelabs.com/rest/v1/info/platforms/webdriver
[
{
"short_version": "4.3",
"long_name": "iPad",
"api_name": "ipad",
"long_version": "4.3.",
"device": "ipad",
"latest_stable_version": "",
"automation_backend": "webdriver",
"os": "Mac 10.6"
@tkrugg
tkrugg / _t.js
Created November 25, 2014 09:02
Quick & dirty templating function for the brave & lazy
var data = {name: "Jones"}
var str = "Have you met Miss {{name}}"
function _t(str, data) {
var re = /{{(\w+)}}/g
while(m = re.exec(str)) {
str = str.replace(m[0], data[m[1]]);
}
return str;
}
@tkrugg
tkrugg / 0_reuse_code.js
Created July 25, 2014 09:35
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@tkrugg
tkrugg / clean.sh
Created June 17, 2014 13:08
Removing all console.logs in a file
sed -i -e '/^\s*console\.log\(.*\);\s*$/d' code.js
@tkrugg
tkrugg / flatuicolors.json
Last active August 29, 2015 14:02
Flat UI colors
{
"turquoise": "rgba(26, 188, 156,1.0)",
"emerland": "rgba(46, 204, 113,1.0)",
"peter-river": "rgba(52, 152, 219,1.0)",
"amethyst": "rgba(155, 89, 182,1.0)",
"wet-asphalt": "rgba(52, 73, 94,1.0)",
"green-sea": "rgba(22, 160, 133,1.0)",
"nephritis": "rgba(39, 174, 96,1.0)",
"belize-hole": "rgba(41, 128, 185,1.0)",
"wisteria": "rgba(142, 68, 173,1.0)",

Modules

  • provide a way to namespace/group services, directives, filters, configuration information and initialization code
  • help avoid global variables
  • are used to configure the $injector, allowing the things defined by the module (or the whole module itself) to be injected elsewhere (Dependency Injection stuff)
  • Angular modules are not related to CommonJS or Require.js. As opposed to AMD or Require.js modules, Angular modules don't try to solve the problem of script load ordering or lazy script fetching. These goals are orthogonal and both module systems can live side by side and fulfill their goals (so the docs claim).

Providers

Services