Skip to content

Instantly share code, notes, and snippets.

View ArnaudValensi's full-sized avatar

Arnaud Valensi ArnaudValensi

View GitHub Profile
@ArnaudValensi
ArnaudValensi / express.js
Last active September 8, 2015 13:31 — forked from azat-co/express.js
var express = require('express')
, mongoskin = require('mongoskin')
var app = express()
app.use(express.bodyParser())
var db = mongoskin.db('localhost:27017/test', {safe:true});
app.param('collectionName', function(req, res, next, collectionName){
req.collection = db.collection(collectionName)
@ArnaudValensi
ArnaudValensi / _service.md
Last active October 28, 2015 15:04 — forked from naholyr/_service.md
Sample /etc/init.d script

Sample service script for debianoids

Look at LSB init scripts for more information.

Demo

Creating the service:

service-create

#!/bin/bash
# To uncryp:
# $ ccrypt -d --key YourRandomKeyToCrypt fileToUncrypt
SERVER=host0.mindup.io
USER=root
DEST_PATH=/home/backup_arnaud/
KEY=YourRandomKeyToCrypt
import React from 'react'
import ReactDOM from 'react-dom'
import classNames from 'classnames'
export default class ScrollEffect extends React.Component {
constructor () {
super()
this.state = {
animated: false
using System;
using System.Collections.Generic;
/// <summary>
/// Priority queue. All methods are O(1) but Contains() which is O(n).
/// The queue is thread safe.
///
/// Usage:
/// int nbPriority = 3;
/// var queue = PriorityQueue<string>(nbPriority);
import Ember from 'ember';
export default Ember.Component.extend({
didReceiveAttrs: function() {
this._super(...arguments);
console.log('didReceiveAttrs, style: ', this.get('section.style'));
},
});
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Twitch</title>
<link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Lato" />
<style>
* {
margin: 0;
@ArnaudValensi
ArnaudValensi / schemaspy.sh
Created September 11, 2017 16:44 — forked from arnaudbesnier/schemaspy.sh
SchemaSpy setup & usage
brew install graphviz
# dowload https://github.com/schemaspy/schemaspy/releases/download/v6.0.0-rc1/schemaspy-6.0.0-rc1.jar
# download https://jdbc.postgresql.org/download.html
java -jar schemaspy-6.0.0-rc1.jar -t pgsql -db dbname -host localhost:5435 -u username -p ************ -o ./schemaspy -dp postgresql-9.4.1208.jre6.jar -s public -noads
{
"sections": [
{
"id": 1508407868623,
"title": "User Profile",
"children": [
{
"id": 1508407888954,
"data": {
"id": 1508407888954,
{
"sections": [
{
"id": "b79725ce-a03a-48e3-bb07-b2aff774e4b1",
"title": "User Profile",
"children": [
{
"id": "03cc5f03-a712-4a39-b4f8-1a7420f4b88c",
"type": "view-edit-summary/horizontal-list",
"children": [