Skip to content

Instantly share code, notes, and snippets.

View colinsurprenant's full-sized avatar

Colin Surprenant colinsurprenant

View GitHub Profile
@arya-oss
arya-oss / INSTALL.md
Last active November 18, 2023 13:58
Ubuntu 16.04 Developer Tools installation

Ubuntu 16.04 Developer Tools Installation

First things first !

sudo apt update
sudo apt upgrade

Standard Developer Tools

sudo apt-get install build-essential git
@staltz
staltz / introrx.md
Last active May 23, 2024 20:07
The introduction to Reactive Programming you've been missing
@seang-es
seang-es / esdiagdump.sh-DEPRECATED
Last active August 29, 2015 14:01
esdiagdump.sh - create log bundle for ES support
#!/bin/bash
#
# esdiagdump
#
# Usage: esdiagdump [-h <hostname/IP>:<port>] [-o <output filename>]
# hostname defaults to localhost
# output file defaults to current directory/esdiagdump.out.<timestamp>
#
# This version is no longer being maintained. The current version lives in the elasticsearch/dev/shared/tools repository.
# alias to edit commit messages without using rebase interactive
# example: git reword commithash message
reword = "!f() {\n GIT_SEQUENCE_EDITOR=\"sed -i 1s/^pick/reword/\" GIT_EDITOR=\"printf \\\"%s\\n\\\" \\\"$2\\\" >\" git rebase -i \"$1^\";\n git push -f;\n}; f"
# edit all commit messages
git rebase -i --root
# clone all your repos with gh cli tool
gh repo list --json name -q '.[].name' | xargs -n1 gh repo clone
@0xabad1dea
0xabad1dea / rsa-not-buying-it.md
Last active May 4, 2022 21:59
Sorry, RSA, I'm just not buying it

Sorry, RSA, I'm just not buying it

I want to be extremely clear about three things. First, this is my personal opinion – insert full standard disclaimer. Second, this is not a condemnation of everyone at RSA, present and past. I assume most of them are pretty okay, and that the problem is confined to a few specific points in the company. However, “unknown problem people making major decisions at RSA” is a bit unwieldy, so I will just say RSA. Third, I'm not calling for a total boycott on RSA. I work almost literally across the street from them and I don’t want to get beat up by roving gangs of cryptographers at the local Chipotle.

RSA's denial published last night is utter codswallop that denies pretty much everything in the world except the actual allegations put forth by Reuters and hinted at for months by [other sources](http://li

@henrik-muehe
henrik-muehe / Dockerfile
Created August 5, 2013 11:47
Allows installing the ubuntu "fuse" package without creating any devices. Used to install packages on docker which require fuse but do not actively use it.
...
# Fake a fuse install
RUN apt-get install libfuse2
RUN cd /tmp ; apt-get download fuse
RUN cd /tmp ; dpkg-deb -x fuse_* .
RUN cd /tmp ; dpkg-deb -e fuse_*
RUN cd /tmp ; rm fuse_*.deb
RUN cd /tmp ; echo -en '#!/bin/bash\nexit 0\n' > DEBIAN/postinst
RUN cd /tmp ; dpkg-deb -b . /fuse.deb
@macournoyer
macournoyer / Dockerfile
Last active December 14, 2019 16:31
Playing w/ Dockerfile on OS X
FROM base
MAINTAINER Marc-Andre Cournoyer "macournoyer@gmail.com"
RUN apt-get -y update
RUN apt-get install -y -q curl
RUN curl -L https://get.rvm.io | bash -s stable --ruby
RUN /bin/bash -l -c rvm requirements
@aiwilliams
aiwilliams / api_helpers_warden.rb
Last active December 15, 2015 00:39
Using Warden and Grape? You'll need some code to configure the Warden::Manager and install the Warden::Proxy in the Rack env. For Rails, this is typically done using Devise or rails_warden, and then you'll need some helper methods in your Grape::API, similar to those found in http://github.com/hassox/rails_warden/blob/master/lib/rails_warden/con…
# Provide access to the Warden::Proxy in the Rack env by including this module in your Grape::API:
#
# helpers Api::Helpers::Warden
#
# These methods require that something has configured the Warden::Manager, and
# the upstream middleware is in place to make the Warden::Proxy exist in the
# env! In a Rails app, this is typically done by Devise or rails_warden.
#
module Api::Helpers::Warden
@louismullie
louismullie / textrank-sentence.rb
Last active September 13, 2022 07:02
An implementation of the TextRank algorithm for extractive summarization using Treat + GraphRank. Uses the number of non-stop-words with a common stem as a similarity metric between sentences.
require 'graph-rank'
require 'treat'
# Implements the PageRank algorithm for
# unsupervised extractive summarization.
#
# Reference: R. Mihalcea and P. Tarau, “TextRank:
# Bringing Order into Texts,” in Proceedings of
# EMNLP 2004. Association for Computational
# Linguistics, 2004, pp. 404–411.
@thbar
thbar / Procfile
Last active December 10, 2015 21:39
A quick node.js script to do many pings to a load-balanced app until a given instance behind the load-balancer replies. Please note that I'm barely starting to use node.js, any improvement is most welcome.
web: node run.js