Skip to content

Instantly share code, notes, and snippets.

View tdantas's full-sized avatar
🏠
Working from home

Thiago Dantas tdantas

🏠
Working from home
View GitHub Profile
@tdantas
tdantas / recipe.md
Created July 26, 2013 17:07
Openssl recipes pkcs7 to x509

#HTTPS SSL Apache

We received 2 files.

  • PKCS7
  • Intermediate.crt

###How to extract X.509 from PKCS7 ?

@tdantas
tdantas / virtual.conf
Created July 24, 2013 19:37
apache ssl recipe configuration for our rails configuration
<VirtualHost *:80>
ServerName domain.com
ServerAlias www.domain.com
#ServerAlias *.domain.com
RailsBaseURI /join
<Directory /join>
Options -MultiViews
@tdantas
tdantas / HOWTO.md
Last active July 5, 2023 20:43
Too Many Connections Postgresql ( HomeBrew Installation)

HOWTO avoid 'too many connections'


Ask postgresql where is the configuration file

$ psql postgres
 psql (9.2.2)
   Type "help" for help.
@tdantas
tdantas / ccs.md
Last active April 15, 2020 22:18
capybara cheat sheet

Copy from capybara's github page

Navigating

visit('/projects')  

Clicking links and buttons

click_link('id-of-link')  
click_link('Link Text')  
click_button('Save')  

click('Link Text') # Click either a link or a button

@tdantas
tdantas / backup
Last active December 17, 2015 06:09
mysql backup instructions debian squeeze
$ sudo innobackupex --user=USER --password=PASSWORD PATH_TO_BACKUP_DIR
@tdantas
tdantas / chef-install.sh
Last active December 16, 2015 12:39
Chef Installer curl - Ubuntu
#!/usr/bin/env bash
apt-get -y update
apt-get -y install libreadline6-dev build-essential libyaml-dev zlib1g-dev libssl-dev
apt-get -y install ruby1.9.3
apt-get -y install ruby1.9.1-dev
gem install chef --no-ri --no-rdoc
var express = require('express');
var redis = require('redis');
const serverType = process.argv[2];
const serverHost = process.argv[3];
const serverPort = parseInt(process.argv[4]);
const redisPort = 6379;
const redisHost = '127.0.0.1';
http {
proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=one:8m max_size=3000m inactive=600m;
proxy_temp_path /var/tmp;
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
gzip on;
gzip_comp_level 6;

Simplistic Full-Text Search With Redis's Sorted Sets

Howto

git clone git://gist.github.com/923934.git redisearch

cd redisearch
# Build an inverted index for a full-text search engine with Redis.
# Copyright (C) 2009 Salvatore Sanfilippo. Under the BSD License.
# USAGE:
#
# ruby invertedindex.rb add somedir/*.c
# ruby invertedindex.rb add somedir/*.txt
# ruby search your query string
require 'rubygems'
require 'redis'