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 datetime as dt | |
import matplotlib.dates as mdates | |
from mpl_toolkits.axes_grid.axislines import Subplot | |
from time import sleep | |
%matplotlib inline | |
def gen_dashboard(): | |
# Generate months | |
months = [] |
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
/* | |
* Based on https://raw.githubusercontent.com/usefulfor/usefulfor/master/security/JBoss.java | |
* | |
* JBoss.java - Blowfish encryption/decryption tool with JBoss default password | |
* Daniel Martin Gomez <daniel@ngssoftware.com> - 03/Sep/2009 | |
* | |
* This file may be used under the terms of the GNU General Public License | |
* version 2.0 as published by the Free Software Foundation: | |
* http://www.gnu.org/licenses/gpl-2.0.html | |
*/ |
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 -*- | |
"""magics for using blockdiag.com modules with IPython Notebook | |
The module provides magics: %%actdiag, %%blockdiag, %%nwdiag, %%seqdiag | |
Sample usage (in IPython cell): | |
%%blockdiag | |
{ | |
A -> B -> C; |
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 python | |
# -*- coding: utf-8 -*- | |
# vim:fenc=utf-8 | |
""" Simple demo of using multiprocessing when parsing files """ | |
import sys | |
import os | |
import codecs | |
from multiprocessing import Pool, Process, Queue, cpu_count |
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
############################################## | |
# Sample client-side OpenVPN 2.0 config file # | |
# for connecting to multi-client server. # | |
# # | |
# This configuration can be used by multiple # | |
# clients, however each client should have # | |
# its own cert and key files. # | |
# # | |
# On Windows, you might want to rename this # | |
# file so it has a .ovpn extension # |
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
#!/bin/bash | |
# Config | |
N2CHROOT=~victor/tmp/n2chroot | |
export JAIL=/var/www/chroot | |
function create_chroot { | |
# Create devices | |
mkdir $JAIL/dev | |
mknod -m 0666 $JAIL/dev/null c 1 3 |
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 pandas as pd | |
import os | |
# Config stuff | |
url="https://www.yourapp.com/add/new/file" | |
headers = { | |
'User-Agent': 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0' | |
# Add here more headers |
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
// Show stack and dereferenced values using Graphviz (DOT) | |
// (c) Victor Dorneanu | |
digraph G { | |
// Define layout | |
graph [pad=".75", ranksep="0.95", nodesep="0.05"]; | |
rankdir=LR; | |
node [shape="record"]; | |
rank=same; |
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
# Make sure you authorize your access token to be used with SAML | |
# https://help.github.com/articles/authorizing-a-personal-access-token-for-use-with-a-saml-single-sign-on-organization/ | |
# | |
# Run: | |
# python list_all_repos.py <org> | |
import github3 | |
import os | |
GITHUB_ACCESS_TOKEN = os.environ["GITHUB_ACCESS_TOKEN"] |
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
// Go Playground: https://play.golang.org/p/cMutpCzpmth | |
package main | |
import ( | |
"fmt" | |
"encoding/json" | |
) | |
// Field is a key value structure |
OlderNewer