Skip to content

Instantly share code, notes, and snippets.

View carlosrobles's full-sized avatar

carlosrobles

  • Dubai - Hong Kong - Manila - London - Barcelona
View GitHub Profile
@carlosrobles
carlosrobles / add_auto_increment_to_int_single_pk.sql
Last active December 6, 2022 18:53
Add auto_increment to all the single PRIMARY KEY of type int of a database
DROP TABLE if exists temp;
CREATE TABLE temp (
`table` varchar(250) DEFAULT NULL,
`colum` varchar(250) DEFAULT NULL,
`type` varchar(250) DEFAULT NULL,
`number_of_PK` tinyint(2) DEFAULT NULL,
`alter` varchar(250) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
@carlosrobles
carlosrobles / self_route.vcl
Created July 7, 2018 07:06 — forked from rezan/self_route.vcl
Self routing Varnish Cache cluster example
# Self routing cluster example
vcl 4.0;
import directors;
backend node1 {
.host = "node1.example.com";
.port = "80";
}
@carlosrobles
carlosrobles / slack_history.py
Created September 14, 2016 11:06 — forked from Chandler/slack_history.py
Download Slack Channel/PrivateChannel/DirectMessage History
from slacker import Slacker
import json
import argparse
import os
# This script finds all channels, private channels and direct messages
# that your user participates in, downloads the complete history for
# those converations and writes each conversation out to seperate json files.
#
# This user centric history gathering is nice because the official slack data exporter
# only exports public channels.
@carlosrobles
carlosrobles / github_release_management.py
Created August 22, 2016 19:05 — forked from RaviH/github_release_management.py
Manages GitHub repository releases
import json
import os
from optparse import OptionParser
import requests
import sys
import logging as log
__author__ = 'ravi'
API_URL = 'https://github.com/api/v3/repos/{}/{}/releases'
import android.content.res.Resources;
import android.graphics.drawable.Drawable;
import android.text.Spannable;
import android.text.SpannableStringBuilder;
import android.text.style.ImageSpan;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.SearchView;
import android.widget.TextView;