Skip to content

Instantly share code, notes, and snippets.

@6uimorais
6uimorais / _Self-Hosted-Kadira-APM-Docker-Compose -Ubuntu.md
Last active January 29, 2022 16:34
Self Hosted Kadira APM - Docker Compose - Ubuntu

1 - Get an Ubuntu machine up and running (make sure ports 11011 and 4000 are open)

2 - Install docker + docker-compose (full_install_docker_compose.sh)

3 - Get a docker-compose.yml with mongodb, kadira-ui, kadira-engine and kadira-rma (docker-compose.yml)

3 - Run "sudo docker-compose up" (-d if you want it running on background)

4 - Access http://machineIp:4000 and login as "[email protected]" and "admin" password

5 - Create your APP, get the ID and Secret

6 - Setup kadira in your app by code or settings.json (Config)

7 - Update your app from "free" plan to "paid" to get full access at Kadira ([Update App Plan](https://gist.github.com/6uimorais/1e1de20bbbb2a04fe19fc73f88d6a25f#file-changepl

@siakaramalegos
siakaramalegos / basic_router.jsx
Last active July 6, 2023 04:02
Basic example of React Router: BrowserRouter, Link, Route, and Switch
// BrowserRouter is the router implementation for HTML5 browsers (vs Native).
// Link is your replacement for anchor tags.
// Route is the conditionally shown component based on matching a path to a URL.
// Switch returns only the first matching route rather than all matching routes.
import {
BrowserRouter as Router,
Link,
Route,
Switch,
} from 'react-router-dom';
@mattiaslundberg
mattiaslundberg / Ansible Let's Encrypt Nginx setup
Last active November 15, 2024 02:10
Let's Encrypt Nginx setup with Ansible
Ansible playbook to setup HTTPS using Let's encrypt on nginx.
The Ansible playbook installs everything needed to serve static files from a nginx server over HTTPS.
The server pass A rating on [SSL Labs](https://www.ssllabs.com/).
To use:
1. Install [Ansible](https://www.ansible.com/)
2. Setup an Ubuntu 16.04 server accessible over ssh
3. Create `/etc/ansible/hosts` according to template below and change example.com to your domain
4. Copy the rest of the files to an empty directory (`playbook.yml` in the root of that folder and the rest in the `templates` subfolder)
@peter76111
peter76111 / testcase.sh
Created January 18, 2016 01:26 — forked from jmbarbier/testcase.sh
Gandi systemd / docker failure at reboot testcase.
#!/bin/bash
# Test restart d'une VM sur instance de base Gandi Debian 8 + install par défaut de docker
VM=dockersystemd
gandi vm create --datacenter LU --memory 1024 --cores 2 --ip-version 4 --hostname $VM --image "Debian 8 64 bits (HVM)" --size 10G
echo "Installing docker"
gandi vm ssh $VM 'apt-get update && apt-get install -y curl'
gandi vm ssh $VM 'curl -sSL https://get.docker.com/ | sh'
@DanAncona
DanAncona / meteor-wrapasync.md
Last active September 11, 2017 14:43
Meteor vs. the Twitter API via wrapAsync and Twit

Twit and other Node libraries don't always quite drop into Meteor's reactive architecture right out of the box. Luckily Meteor makes adapting them super-duper easy with wrapAsync. It was so easy that I naturally tried all the more difficult ways first! Since I didn't find a nice gist or StackOverflow example, please enjoy this one.

In the template -

{{#with pos}}
  {{#if ready}}
    {{> singlePosition data }}
@pixeline
pixeline / ajax-handler-wp.php
Last active October 5, 2022 13:09
Custom ajax handler for Wordpress. Using admin-ajax.php, as is usually recommended, is very slow and does not allow the use of plugin shortcodes. Using a custom ajax handler like this bypasses that. http://wordpress.stackexchange.com/questions/170808/the-content-shows-shortcode-instead-of-parsing-it
<?php
/*
WORDPRESS SPECIFIC AJAX HANDLER (because admin-ajax.php does not render plugin shortcodes).
by [email protected]
credits: Raz Ohad https://coderwall.com/p/of7y2q/faster-ajax-for-wordpress
*/
//mimic the actual admin-ajax
define('DOING_AJAX', true);
if (!isset( $_REQUEST['action']))
@diegocasmo
diegocasmo / ImageHelper.js
Last active August 29, 2015 14:10
Helper object to preload images.
define([
'jquery',
'underscore'
], function ($, _) {
var ImageHelper = {
initialize: function () {
var example = [
"img/image1.jpg",
"img/image2.jpg"
@alexanderscott
alexanderscott / git-prune-file.sh
Created September 7, 2014 03:56
remove file from git history, prune & garbage collect, push removal to origin
#!/bin/bash
# Get filename from cmd-line arg
filename=$1
# Fetch all remote branches locally and setup tracking
for branch in `git branch -a | grep remotes | grep -v HEAD | grep -v master`; do
git branch --track ${branch##*/} $branch
done
@soerenkampschroer
soerenkampschroer / Gruntfile.js
Created July 18, 2014 15:31
updated gruntfile for bootstrap
/*!
* Bootstrap's Gruntfile
* http://getbootstrap.com
* Copyright 2013-2014 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
module.exports = function (grunt) {
'use strict';
@nicholasohrn
nicholasohrn / automatically-title-post.php
Created March 4, 2014 18:17
Automatically title a post based on its type and category
<?php
/*
Plugin Name: Automatically Title Post
Description: Automatically title post based on post type and taxonomy.
Version: 1.0.0.RC.1
Author: Nick Ohrn of Plugin-Developer.com
Author URI: http://plugin-developer.com/
*/
function automatically_title_post($post_id, $post, $update) {