Skip to content

Instantly share code, notes, and snippets.

View tangorri's full-sized avatar

tango tangorri

  • France
View GitHub Profile
@nicerobot
nicerobot / README.md
Last active February 25, 2024 02:41
Mac OS X uninstall script for packaged install of node.js from https://stackoverflow.com/a/9287292/23056

To run this, you can try:

curl -ksO https://gist.githubusercontent.com/nicerobot/2697848/raw/uninstall-node.sh
chmod +x ./uninstall-node.sh
./uninstall-node.sh
rm uninstall-node.sh
@jonschlinkert
jonschlinkert / markdown-cheatsheet.md
Last active April 11, 2024 04:45
A better markdown cheatsheet.
@CMCDragonkai
CMCDragonkai / angularjs_directive_attribute_explanation.md
Last active November 29, 2023 15:35
JS: AngularJS Directive Attribute Binding Explanation

AngularJS Directive Attribute Binding Explanation

When using directives, you often need to pass parameters to the directive. This can be done in several ways. The first 3 can be used whether scope is true or false. This is still a WIP, so validate for yourself.

  1. Raw Attribute Strings

    <div my-directive="some string" another-param="another string"></div>
@miketrionfo
miketrionfo / Angular-Chart-Directive.md
Last active March 14, 2018 21:11
Angular directive code to help resize/redraw non-responsive elements (like D3 charts) in a bootstrap responsive design when the window moves across bootstrap boundaries.

Purpose

Angular directive code to help resize/redraw non-responsive elements (like D3 charts) in a bootstrap responsive design when the window moves across bootstrap boundaries.

(I edited my boostrap to create an extra size for some 7" tablets and landscape phones @ 600px)

What do you think? Good? Bad? Ugly? How could it be better? What other options exist?

Credit to tagtree for the Rickshaw directive help: http://tagtree.tv/d3-with-rickshaw-and-angular

@aquelito
aquelito / git-command.md
Last active February 22, 2024 12:49
GIT - Ligne de commande principale
title category
Git config
Git

Rappel

Ne pas oublier : l'aide en ligne de commande.

@jacobblock
jacobblock / FreeNAS.md
Last active October 22, 2023 13:01
Ultimate FreeNAS Setup

FreeNAS

I started using FreeNAS in August 2013. It is fantastic piece of software and I have been really impressed by the upgrades just in the few months I've been using it. It looks like they recently went to a plugin system as of version 9 to make installing software easier for end users. I've ran into several issues related to plugins and user + group permissions so I decided to just use the available FreeBSD port system. After fiddling for a few days (now turned into months) I believe I have created something helpful for the community and anyone interested in picking up the port system. The sandbox nature of FreeNAS's jail system is especially helpful for playing around without having any consequence on your core system.

Here are straight-forward instructions to setting up a bunch of different software on FreeNAS. If you make a terrible error, just throw up another plugin sandbox and repeat.

ToC

@markrian
markrian / vermin.js
Created August 21, 2014 11:07
Opinionated grunt task to manage filerev and usemin to ensure correct hashes after replacements. See https://github.com/yeoman/grunt-usemin/issues/288.
'use strict';
/**
* Vermin completely manages the running of the filerev and usemin tasks, so
* that assets that reference other assets are correctly hashed after their
* referenced assets are spliced in by usemin.
*
* Vermin also makes various assumptions about how filerev and usemin are set
* up. For instance, it assumes that usemin runs immediately after filerev,
* that filerev renames files in-place, and that usemin relies on
@michaelcolenso
michaelcolenso / deploy.js
Created December 11, 2014 04:13
gulp task to deploy to s3
// Publish to Amazon S3 / CloudFront
gulp.task('deploy', function () {
var awspublish = require('gulp-awspublish');
var aws = {
"key": process.env.AWS_KEY,
"secret": process.env.AWS_SECRET,
"bucket": 'XXXXXXXX',
"region": 'us-standard',
"distributionId": 'XXXXXXXX'
};
@MikeRatcliffe
MikeRatcliffe / FreeNAS.md
Last active December 2, 2021 23:26 — forked from jacobblock/FreeNAS.md
Ultimate FreeNAS Setup
@EtienneR
EtienneR / user.js
Created January 7, 2016 23:39
XMLHttpRequest RESTful (GET, POST, PUT, DELETE)
// Get all users
var url = "http://localhost:8080/api/v1/users";
var xhr = new XMLHttpRequest()
xhr.open('GET', url, true)
xhr.onload = function () {
var users = JSON.parse(xhr.responseText);
if (xhr.readyState == 4 && xhr.status == "200") {
console.table(users);
} else {
console.error(users);