Skip to content

Instantly share code, notes, and snippets.

View renatosnrg's full-sized avatar

Renato Neves renatosnrg

View GitHub Profile
#!/bin/sh
DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker}
mkdir -p $DOCKER_CONFIG/cli-plugins
curl -SL https://github.com/docker/compose/releases/download/v2.29.2/docker-compose-linux-x86_64 -o $DOCKER_CONFIG/cli-plugins/docker-compose
chmod +x $DOCKER_CONFIG/cli-plugins/docker-compose
version: '3.3'
services:
cbt-agent-container:
container_name: cbt-agent-container
command: ldap-agent
environment:
- LOG_DIR=/var/log/cbt-ldap-agent
- CONFIG_DIR=/etc/cbt-ldap-agent
volumes:
- '/var/log/cbt-ldap-agent:/var/log/cbt-ldap-agent'
@renatosnrg
renatosnrg / fifa.js
Last active August 29, 2015 14:02
Monitor ticket availability at Fifa.com Ticketing System site: https://fwctickets.fifa.com/ticketingsystem.aspx?l=en#Tck2
/*
Monitor ticket availability at Fifa.com Ticketing System site
Run this code at https://fwctickets.fifa.com/ticketingsystem.aspx?l=en#Tck2
(use the console available in any browser developer inspector)
- configure the timeout between refreshes and the matches you want to monitor
- when any available ticket is found a beep sound is played and the refresh stops
*/
function checkTicket() {
@renatosnrg
renatosnrg / count css rules
Last active December 30, 2015 06:29
Count total rules and selectors for each CSS file in a web page
function showCSSCountInfo(options) {
var styleSheets = document.styleSheets,
totalStyleSheets = styleSheets.length;
options = options || {};
alert_exceeded = options.alert_exceeded || true;
max = options.max || 4096;
for (var j = 0; j < totalStyleSheets; j++) {
var styleSheet = styleSheets[j],
@renatosnrg
renatosnrg / gist:3993931
Created November 1, 2012 14:26
API para publicação no Facebook de um usuário do Social Login
curl -iX POST --user <API_ID>:<API_SECRET> -H "Content-type:application/json" -d "{'update': {'message': 'Visite o Social-ID NOW', 'link': 'http://www.socialidnow.com', 'picture': 'http://www.socialidnow.com/logo.png', 'name': 'Social-ID NOW', 'caption': 'Plataforma de Infraestrutura Social', 'description': 'O Social-ID NOW integra seu negócio com as redes sociais. Conheça melhor seu cliente.' }}" "https://api.socialidnow.com/v1/marketing/login/users/<USER_ID>/updates/facebook"
@renatosnrg
renatosnrg / gist:3840263
Created October 5, 2012 14:54
API to get connection_id given an email
curl -iX POST --user <API_id>:<API_secret> -d "{'email': '<email>'}" -H 'Content-type: application/json' 'https://api.socialidnow.com/v1/marketing/login/apps/<login_app_id>/connections/email'
@renatosnrg
renatosnrg / gist:3370033
Created August 16, 2012 13:17
Social Login Widget
<script>
//<![CDATA[
var e = document.createElement('script');
e.type = 'text/javascript';
e.id = 'socialid_login_script';
if (document.location.protocol === 'https:') {
e.src = 'https://app.socialidnow.com/javascripts/marketing/login/widgets/login.js?1343653084';
} else {
e.src = 'http://app.socialidnow.com/javascripts/marketing/login/widgets/login.js?1343653084';
}
@renatosnrg
renatosnrg / gist:3369953
Created August 16, 2012 13:01
Webform Widget
<a href="" id="social-id-campaign-link">teste</a>
<script>
//<![CDATA[
(function(w){
var s = w.document.createElement('script');
s.setAttribute('src', 'https://app.socialidnow.com/javascripts/marketing/registration_widget.js?1343653084');
s.setAttribute('type', 'text/javascript');
s.setAttribute('async', true);
var c = function(){
if(SocialId){