Skip to content

Instantly share code, notes, and snippets.

View thangnvdigdinos's full-sized avatar

Thang Nguyen thangnvdigdinos

View GitHub Profile
/*
* Companion code for article at http://toddhayton.com/2019/02/12/revisiting-taleo-with-puppeteer/
*
* Setup:
* $ mkdir scraper/
* $ cd scraper/
docker-cluster-with-celery-and-rabbitmq
-- test_celery
-- __init__.py
-- celery.py
-- tasks.py
-- run_tasks.py
-- docker-compose.yml
-- dockerfile
-- requirements.txt
@thangnvdigdinos
thangnvdigdinos / docker-compose.yml
Created May 5, 2020 02:28 — forked from nguyenhuucam91/docker-compose.yml
Cấu hình Docker-compose yml chạy Nginx / Php / Mysql / Redis
version: '2'
services:
web:
container_name: docker-nginx-latest
image: nginx:latest
restart: always
ports:
- "80:80"
volumes:
- ./code:/var/www
@thangnvdigdinos
thangnvdigdinos / ansible.yml
Created June 18, 2018 07:22 — forked from bennylope/ansible.yml
Deployment w/ Capistrano style deployments with Ansible & Capistrano
---
- name: Deploy new site release
user: deployer
hosts: all
tasks:
- name: Fetch repo updates
git: >
[email protected]:my/repo.git
@thangnvdigdinos
thangnvdigdinos / gist:de663c427919680703d01aa62bf4f719
Created February 6, 2018 02:59 — forked from mikeyk/gist:1329319
Testing storage of millions of keys in Redis
#! /usr/bin/env python
import redis
import random
import pylibmc
import sys
r = redis.Redis(host = 'localhost', port = 6389)
mc = pylibmc.Client(['localhost:11222'])
@thangnvdigdinos
thangnvdigdinos / laravel-nginx.conf
Created October 16, 2016 07:59 — forked from ahmadazimi/laravel-nginx.conf
Laravel Nginx Php-fpm server configuration file (Centos 7)
server {
server_name www.abc.com;
return 301 $scheme://abc.com$request_uri;
}
server {
listen 80;
server_name abc.com;
@thangnvdigdinos
thangnvdigdinos / flow.groovy
Created September 9, 2016 07:31 — forked from uaarkoti/flow.groovy
Sample Workflow
// Run this part of the job on a node with a name or label of 'linux-64bit'
node('linux-64bit') {
// Checkout my source
git url: '/var/lib/jenkins/workflow-plugin-pipeline-demo'
// Set a particular maven install to use for this build
env.PATH="${tool 'Maven 3.x'}/bin:${env.PATH}"
// Start 'Dev' stage
@thangnvdigdinos
thangnvdigdinos / IoC.php
Last active August 29, 2015 14:10 — forked from orakaro/IoC.php
<?php
class IoC {
protected static $registry = array();
protected static $shared = array();
// Register
public static function register($name, Closure $resolve)
{
static::$registry[$name] = $resolve;
##########
# For verification, you can display the OS release.
##########
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=11.10
DISTRIB_CODENAME=oneiric
DISTRIB_DESCRIPTION="Ubuntu 11.10"
##########
#!/bin/bash
PID_FILE=/var/run/fluentd.pid
CONF_FILE=/etc/fluent/fluent.conf
LOG_FILE=/var/log/fluent/fluent.log
PSNAME="fluentd --daemon"
F_USER=fluentd
F_GROUP=fluentd
RUBY_VER="1.9.3-p194"