This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
ffmpeg -f avfoundation -framerate 30 -s "640x480" -i "0" -c:v rawvideo -pix_fmt rgb24 -f caca -s "640x480" output4.mp4
brew install homebrew-ffmpeg/ffmpeg/ffmpeg --with-libcaca
ffmpeg -i vitrine.mp4 -vf scale=1024:-1 -q:vscale 0 vitrine.avi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python2 | |
import SimpleHTTPServer | |
import SocketServer | |
import logging | |
PORT = 8000 | |
class GetHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1. Install Chocolatey | |
<# | |
Set-ExecutionPolicy RemoteSigned -Force | |
# Create empty profile (so profile-integration scripts have something to append to) | |
if (-not (Test-Path $PROFILE)) { | |
$directory = [IO.Path]::GetDirectoryName($PROFILE) | |
if (-not (Test-Path $directory)) { | |
New-Item -ItemType Directory $directory | Out-Null | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import linguistictagger | |
import re | |
import workflow | |
def capitalize_(s): | |
if re.search(r"[A-Z]", s): | |
return s | |
else: |
A personal diary of DataFrame munging over the years.
Convert Series datatype to numeric (will error if column has non-numeric values)
(h/t @makmanalp)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import base64 | |
import json | |
from simple_salesforce import Salesforce | |
userName = '' | |
password = '' | |
securityToken = '' | |
instance = '' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |