Skip to content

Instantly share code, notes, and snippets.

View jeckel's full-sized avatar
🐧
Freelance (Available for new projects)

Julien Mercier-Rojas jeckel

🐧
Freelance (Available for new projects)
View GitHub Profile
@ziadoz
ziadoz / eloquent.php
Last active November 28, 2018 14:40
Laravel 4 Eloquent ORM Standalone (Observers, Query Logging).
<?php
class Post
{
protected $table = 'posts';
/**
* You can define your own custom boot method.
*
* @return void
**/
@pdeschen
pdeschen / initd
Created May 12, 2013 18:10
CentOS service initd erb template. Ready to use in Opscode Chef or replace template variables with your own hard-coded value. Takes into account priority/nice, sudo user, and /etc/sysconfig/ Support start, stop, restart, console.
#!/bin/sh
#
# <%=@service%> This shell script takes care of starting and stopping
# the <%=@service%> service.
#
# chkconfig: 2345 65 35
# description: <%=@description%>
#
SERVICE=<%=@service%>
@ekristen
ekristen / check_docker_container.sh
Last active January 16, 2024 16:15
Bash Script for Nagios to Check Status of Docker Container
#!/bin/bash
# Author: Erik Kristensen
# Email: erik@erikkristensen.com
# License: MIT
# Nagios Usage: check_nrpe!check_docker_container!_container_id_
# Usage: ./check_docker_container.sh _container_id_
#
# Depending on your docker configuration, root might be required. If your nrpe user has rights
# to talk to the docker daemon, then root is not required. This is why root privileges are not
@lgaggini
lgaggini / check_docker_container.sh
Last active May 10, 2017 08:33 — forked from ekristen/check_docker_container.sh
Bash Script for Nagios to Check Status of Docker Container
#!/bin/bash
# Author: Erik Kristensen, Lorenzo Gaggini
# Email: erik@erikkristensen.com, lorenzo.gaggini@dada.eu
# License: MIT
# Nagios Usage: check_nrpe!check_docker_container!_container_id_
# Usage: ./check_docker_container.sh _container_id_
#
# The script checks if a container is running and grab performance data
# OK - running
@yunghoy
yunghoy / gist:a425f91824d26461bb2e3653bc56ebbf
Last active June 2, 2022 00:34
AMQP library (RabbitMQ) - async/await
alias babel-node='babel-node --presets stage-0'
------ RECV ------
// babel-node recv2.js "#"
// babel-node recv2.js "kern.*"
const amqp = require('amqplib');
const args = process.argv.slice(2);
if (args.length == 0) {
@jeckel
jeckel / APIDays2018-Presentations.md
Last active December 12, 2018 14:39
APIDays 2018 Presentations and Resources

Twitter LinkedIn

APIDays Logo

APIDays 2018 - Presentations and Resources

Here is a collection of links to presentations and other resources shared during the last #APIDays2018 in Paris.

If you find some mistakes, or have any links to add to this list, feel free to add some comments, or contact me on Twitter or LinkedIn

@erajanraja24
erajanraja24 / gist:2c51e76f906c49f341f331920111aca3
Created December 16, 2018 11:35
Scrape Google search results -Title, URL by Location
function scrapeGoogle() {
var searchResults=UrlFetchApp.fetch("https://www.google.co.uk/search?q="+encodeURIComponent("keyword finder tool")+"&num=30",{muteHttpExceptions:true});
var titleExp=/<h3 class=\"r\">([\s\S]*?)<\/h3>/gi;
var urlExpression=/<h3 class=\"r\">([\s\S]*?)\&amp\;/gi;
var titleResults=searchResults.getContentText().match(titleExp);