Skip to content

Instantly share code, notes, and snippets.

View knxroot's full-sized avatar

Gustavo Lacoste knxroot

View GitHub Profile
andyfowler / gist:10281760
Created April 9, 2014 15:13
Check if your RapidSSL cert is revoked in their OCSP server
View gist:10281760
# download the rapidssl intermediate bundle
curl > rapidssl-bundle.pem
# check if your (presumably revoked) cert is revoked via its OCSP server
# this OCSP url is also in your cert, in the Authority Information Access section
openssl ocsp -issuer rapidssl-bundle.pem -cert YOURCERT.crt -url
ryane /
Created April 17, 2013 19:38
A script (or just list of commands) to setup a jenkins server on Ubuntu 12.04 hosted at linode. Liberally borrowed from
sudo aptitude -y install build-essential libssl-dev libreadline5 libreadline5-dev zlib1g zlib1g-dev
sudo apt-get -y install libxslt-dev libxml2-dev
sudo apt-get -y install libmysqlclient-dev ruby-dev
sudo apt-get -y install libcurl4-openssl-dev
sudo apt-get -y install imagemagick libmagickcore-dev libmagickwand-dev
sudo apt-get -y install libsqlite3-dev
sudo apt-get -y install libreadline-dev
sudo apt-get -y install git
sudo apt-get -y install libicu48
sudo apt-get -y install nodejs
wallymathieu / CSharp_loose.flt
Created November 18, 2011 12:12
Winmerge filter (svn + git)
View CSharp_loose.flt
## This is a directory/file filter for WinMerge
## This filter suppresses various binaries found in Visual C# source trees
name: Visual C# loose
desc: Suppresses various binaries found in Visual C# source trees
## This is an inclusive (loose) filter
## (it lets through everything not specified)
def: include
## Filters for filenames begin with f:
zeroSteiner /
Last active July 26, 2016 16:45
Parse ODBC Trace logs into a more easily usable format.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2013 Spencer McIntyre <>
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
ctokheim /
Last active September 14, 2016 13:28
Python: tricks
import pandas as pd
import numpy as np
# read df from delimited file
df = pd.read_csv('filename.txt', sep='\t')
# force printing out of dataframe
print df.to_string()
# apply a function to column/row
mountaindude / date_variables.qvs
Last active January 23, 2018 10:43
QlikView and Qlik Sense date variables
View date_variables.qvs
let vStartOf2ndPreviousQuarter = Date(Floor(QuarterStart(Today(), -2)), 'YYYY-MM-DD');
let vStartOf2ndPreviousQuarterNum = Num(Date(Floor(QuarterStart(Today(), -2)), 'YYYY-MM-DD'));
let vStartOfPreviousQuarter = Date(Floor(QuarterStart(Today(), -1)), 'YYYY-MM-DD');
let vStartOfPreviousQuarterNum = Num(Date(Floor(QuarterStart(Today(), -1)), 'YYYY-MM-DD'));
let vStartOfCurrentQuarter = Date(Floor(QuarterStart(Today())), 'YYYY-MM-DD');
let vStartOfCurrentQuarterNum = Num(Date(Floor(QuarterStart(Today())), 'YYYY-MM-DD'));
let vStartOfPreviousMonth = Date(Floor(MonthStart(Today(), -1)), 'YYYY-MM-DD');
Dnefedkin / BIPCatalogUtil.cmd
Created October 26, 2012 12:09
Runs BI Publisher Catalog Utility on Windows OS
View BIPCatalogUtil.cmd
setLocal EnableDelayedExpansion
@REM *************************************************************************
@REM Purpose: Runs BI Publisher Catalog Utility on Windows OS
@REM Author: Dmitry Nefedkin (
@REM Description: script is based on
@REM found in $MW_HOME\Oracle_BI1\clients\bipublisher\ of Oracle BI EE installation
@REM Last changed: Oct, 25, 2012 18:00
@REM Version: 0.1
@REM *************************************************************************
johnkary / OracleDoctrineTypeMappingListener.php
Created September 8, 2013 03:45
Connecting to Oracle with Symfony2 and Doctrine 2. 1. Map Oracle's DATE type to Doctrine's "date" type instead of "datetime" for Oracle driver. 2. Properly configures Doctrine to use most common Oracle Date and DateTime environment configurations. You may or may not need this. Check your Oracle server configuration and see \Doctrine\DBAL\Event\L…
View OracleDoctrineTypeMappingListener.php
namespace Acme\PeopleSoftBundle\Listener;
use Doctrine\DBAL\Event\ConnectionEventArgs;
use Doctrine\DBAL\Events;
use Doctrine\Common\EventSubscriber;
* Changes Doctrine's default Oracle-specific column type mapping to Doctrine
FloorLamp /
Created January 5, 2014 20:21
Foursquare data extraction
from collections import defaultdict
import datetime
import requests
import time
YEAR_BEGIN = int(time.mktime(,1,1).timetuple()))
YEAR_END = int(time.mktime(,1,1).timetuple()))
WEEK = int(time.mktime(,12,29).timetuple()))
WebReflection /
Last active July 1, 2020 18:08
A basic Self Signed SSL Certificate utility
#!/usr/bin/env bash
# A basic Self Signed SSL Certificate utility
# by Andrea Giammarchi @WebReflection
# # to make it executable and use it
# $ chmod +x certificate
# $ ./certificate # to read the how-to