Skip to content

Instantly share code, notes, and snippets.

View knxroot's full-sized avatar

Gustavo Lacoste knxroot

View GitHub Profile
@andyfowler
andyfowler / gist:10281760
Created April 9, 2014 15:13
Check if your RapidSSL cert is revoked in their OCSP server
# download the rapidssl intermediate bundle
curl https://knowledge.rapidssl.com/library/VERISIGN/ALL_OTHER/RapidSSL%20Intermediate/RapidSSL_CA_bundle.pem > 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 http://rapidssl-ocsp.geotrust.com
@ryane
ryane / ci_install.sh
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 https://gist.github.com/whistler/3179919#file-jenkins_rails_ubuntu-sh
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
wallymathieu / CSharp_loose.flt
Created November 18, 2011 12:12
Winmerge filter (svn + git)
## 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
zeroSteiner / odbc_trace_parser.py
Last active July 26, 2016 16:45
Parse ODBC Trace logs into a more easily usable format.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# odbc_trace_parser.py
#
# Copyright 2013 Spencer McIntyre <zeroSteiner@gmail.com>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
@ctokheim
ctokheim / pandas_tricks.py
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
mountaindude / date_variables.qvs
Last active January 23, 2018 10:43
QlikView and Qlik Sense date variables
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
Dnefedkin / BIPCatalogUtil.cmd
Created October 26, 2012 12:09
Runs BI Publisher Catalog Utility on Windows OS
@ECHO OFF
setLocal EnableDelayedExpansion
@REM *************************************************************************
@REM Purpose: Runs BI Publisher Catalog Utility on Windows OS
@REM Author: Dmitry Nefedkin (Dmitry.Nefedkin@oracle.com)
@REM Description: script is based on BIPCatalogUtil.sh
@REM found in $MW_HOME\Oracle_BI1\clients\bipublisher\ of Oracle BI EE 11.1.1.6 installation
@REM Last changed: Oct, 25, 2012 18:00
@REM Version: 0.1
@REM *************************************************************************
@johnkary
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…
<?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
FloorLamp / foursquare_extract.py
Created January 5, 2014 20:21
Foursquare data extraction
from collections import defaultdict
import datetime
import requests
import time
CHECKINS_API = 'https://api.foursquare.com/v2/users/self/checkins'
CATEGORIES_API = 'https://api.foursquare.com/v2/venues/categories'
YEAR_BEGIN = int(time.mktime(datetime.date(2013,1,1).timetuple()))
YEAR_END = int(time.mktime(datetime.date(2014,1,1).timetuple()))
WEEK = int(time.mktime(datetime.date(2013,12,29).timetuple()))
@WebReflection
WebReflection / certificate.sh
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
# https://www.webreflection.co.uk/blog/2015/08/08/bringing-ssl-to-your-private-network
# # to make it executable and use it
# $ chmod +x certificate
# $ ./certificate # to read the how-to