Skip to content

Instantly share code, notes, and snippets.

Paul Chaignon pchaigno

Block or report user

Report or block pchaigno

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@pchaigno
pchaigno / find-shared.py
Created Apr 14, 2018
Linguist: finds shared interpreters, filenames, extensions, etc. between any 2 languages.
View find-shared.py
#!/usr/bin/env python
import yaml
import sys
with open("lib/linguist/languages.yml", 'r') as stream:
try:
languages = yaml.load(stream)
except yaml.YAMLError as exc:
print(exc)
@pchaigno
pchaigno / Vagrantfile
Last active Jul 26, 2016
OVS + Floodlight from sources in a VM
View Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.network :forwarded_port, guest: 8080, host: 8888
config.vm.provider "virtualbox" do |vb|
vb.memory = 2048
@pchaigno
pchaigno / Dockerfile
Created Jul 17, 2016
Simple linear program with PuLP
View Dockerfile
FROM ubuntu:16.04
MAINTAINER Paul Chaignon <paul.chaignon@gmail.com>
RUN apt update
RUN apt install -y python-pip glpk-utils coinor-cbc
RUN pip install pulp
RUN apt build-dep -y python-matplotlib
RUN pip install --no-cache-dir pylab
ADD . /lp
@pchaigno
pchaigno / bridge.sh
Last active Aug 21, 2016
Use Linux bridge to connect Docker containers to the same subnet as the host
View bridge.sh
#!/bin/bash
BRIDGE_NAME=dbridge
PHYS_IF=eth0
SUBNET=192.168.1.0
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
sudo brctl addbr $BRIDGE_NAME
sudo brctl addif $BRIDGE_NAME $PHYS_IF
sudo ifconfig $BRIDGE_NAME up
@pchaigno
pchaigno / Dockerfile
Last active Mar 18, 2016
Dockerfile to run Trinity in a container - based on https://github.com/ewindisch/trinity-docker
View Dockerfile
FROM ubuntu
RUN apt-get update
RUN apt-get install -qy git build-essential
WORKDIR /opt
RUN git clone https://github.com/kernelslacker/trinity
WORKDIR /opt/trinity
RUN ./configure
@pchaigno
pchaigno / test_mx.rb
Last active Aug 29, 2015
Check MX records for domains in swot gem
View test_mx.rb
require 'helper'
require 'net/smtp'
require 'resolv'
def resolve_mx(domain)
mxs = Resolv::DNS.open do |dns|
ress = dns.getresources(domain, Resolv::DNS::Resource::IN::MX)
ress.map { |r| r.exchange.to_s }
end
return mxs
View ncl.linguist
79.94% NCL
20.06% Text
NCL:
CS4311-TBA/visko/visko-modules/module_ncl/webapp/scripts/ncl/gsn_csm_xy2_time_series_inputs.ncl
billsacks/cism_misc-make_scrip_grid_file/make_scrip_grid_file.ncl
datoncito/NclPrograms/primero.ncl
decvalts/wrf/var/graphics/ncl/gen_be/gsi_be_plots.ncl
dongli/geodiag/geodiag.ncl
fanghuan/ncl/func/ListSetType-help.ncl
View tabel-not-working.md
View table.md
View test-bug-wikicloth.rb
require 'wikicloth'
@wiki = WikiCloth::Parser.new({
:data => "= Title =\n\n #define R23_HIGH_MOD_ADLER32 r23\n \n #define R18_LOW__ADLER_A r18\n\nEnd of test"
})
puts @wiki.to_html
You can’t perform that action at this time.