Skip to content

Instantly share code, notes, and snippets.

View ahmed-bacha's full-sized avatar

AAB ahmed-bacha

View GitHub Profile
package org.pri.controller;
import java.io.File;
import org.neo4j.graphdb.Direction;
import org.neo4j.graphdb.GraphDatabaseService;
import org.neo4j.graphdb.Node;
import org.neo4j.graphdb.Relationship;
import org.neo4j.graphdb.RelationshipType;
import org.neo4j.graphdb.Transaction;
Test, Abdelkrim added ...
{"_id":"30429c526ba7f23e7d5b","title":"Tarte aux fruits","description":"Le Lorem Ipsum est simplement du faux texte employé dans la composition et la mise en page avant impression. Le Lorem Ipsum est le faux texte standard de l'imprimerie depuis les années 1500, quand un peintre anonyme assembla ensemble des morceaux de texte pour réaliser un livre spécimen de polices de texte. Il n'a pas fait que survivre cinq siècles, mais s'est aussi adapté à la bureautique informatique.","duree":"40 MIN","portions":4,"categorie":"Plat","stared":["ahmed-bacha","nbouherrou"],"visites":44,"ingredients":[{"nom":"NAME","quantite":200,"unite":"Gramme"},{"name":"NAME","quantite":5,"unite":"Unit"}],"commentaires":[{"user":"ahmed","message":"Hello world"}],"image":"base64"}
# find head commit
git reflog
# now reset hard - where N is the head commit found in the reflog
git reset --hard HEAD@{N}
@ahmed-bacha
ahmed-bacha / Howto.md
Created November 9, 2015 21:05 — forked from n1k0/Howto.md
CasperJS test cli hooks example

Put test1.js and test2.js into a tests/ directory, then run the suite:

$ casperjs test tests/ --pre=pre.js --includes=inc.js --post=post.js
Test file: /Users/nperriault/tmp/pre-inc/pre.js                                 
Hey, I'm executed before the suite.
Test file: /Users/nperriault/tmp/pre-inc/tests/test1.js                         
# this is test 1
Hi, I've been included.
PASS Subject is strictly true

2015-01-29 Unofficial Relay FAQ

Compilation of questions and answers about Relay from React.js Conf.

Disclaimer: I work on Relay at Facebook. Relay is a complex system on which we're iterating aggressively. I'll do my best here to provide accurate, useful answers, but the details are subject to change. I may also be wrong. Feedback and additional questions are welcome.

What is Relay?

Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).

@ahmed-bacha
ahmed-bacha / infra-secret-management-overview.md
Created August 1, 2016 13:22 — forked from maxvt/infra-secret-management-overview.md
Infrastructure Secret Management Software Overview

Currently, there is an explosion of tools that aim to manage secrets for automated, cloud native infrastructure management. Daniel Somerfield did some work classifying the various approaches, but (as far as I know) no one has made a recent effort to summarize the various tools.

This is an attempt to give a quick overview of what can be found out there. The list is alphabetical. There will be tools that are missing, and some of the facts might be wrong--I welcome your corrections. For the purpose, I can be reached via @maxvt on Twitter, or just leave me a comment here.

There is a companion feature matrix of various tools. Comments are welcome in the same manner.

@ahmed-bacha
ahmed-bacha / pci_dss.md
Created October 7, 2016 20:50 — forked from diyan/pci_dss.md
PCI DSS. Useful resources
@ahmed-bacha
ahmed-bacha / logger.rb
Last active December 1, 2016 15:15 — forked from kryptykphysh/logger.rb
Ruby: Logging module with class names, output to both STDOUT and file
require 'logger'
module Logging
class MultiDelegator
def initialize(*targets)
@targets = targets
end
def self.delegate(*methods)
methods.each do |m|
@ahmed-bacha
ahmed-bacha / multi_logger.rb
Created October 12, 2016 19:28 — forked from clowder/multi_logger.rb
Logging to multiple destinations in Ruby
class MultiLogger
attr_reader :level
def initialize(args={})
@level = args[:level] || Logger::Severity::DEBUG
@loggers = []
Array(args[:loggers]).each { |logger| add_logger(logger) }
end