Skip to content

Instantly share code, notes, and snippets.

View matehat's full-sized avatar

Mathieu D'Amours matehat

View GitHub Profile
@matehat
matehat / 1-setup.md
Created January 14, 2021 14:16 — forked from troyfontaine/1-setup.md
Signing your Git Commits using GPG on MacOS Sierra/High Sierra

Methods of Signing with GPG

There are now two ways to approach this:

  1. Using gpg and generating keys
  2. Using Kryptonite by krypt.co

This Gist explains how to do this using gpg in a step-by-step fashion. Kryptonite is actually wickedly easy to use-but you will still need to follow the instructions

For using a GUI-based GIT tool such as Tower or Github Desktop, follow the steps here for signing with either GPG or Krypt.co.

@matehat
matehat / install_pyspark_and_bigdl.md
Last active September 7, 2018 07:16
How to quickly setup a BigDL/PySpark local cluster using Docker to mess around

First, make sure you've [installed docker][1] on your system

  1. Create some folder you wish to put all files related to your notebook (data files, log files, etc), and navigate to this directory

  2. Run this in your terminal:

    $ docker run --name pyspark --rm -p 8888:8888 -v .:/home/jovyan/work jupyter/pyspark-notebook
Socket.Stream.send!(Socket.TCP.connect!("127.0.0.1", 4423), "CEF:0|FireEye|MPS|7.5.1.318703|rule:101|IDS Event|High| eventId=2141190323 msg=IDS Event type=2 mrt=1428703736994 sessionId=0 generatorID=36sldpUwBABCATI71Gm9j2A\\=\\= categorySignificance=/Compromise categoryBehavior=/Communicate/Query categoryDeviceGroup=/IDS/Network catdt=NULL categoryOutcome=/Attempt categoryObject=/Host/Application/Malware modelConfidence=0 severity=8 relevance=10 assetCriticality=0 priority=8 art=1428703757464 cat=/Rule/Fire deviceSeverity=1 rt=1428704456000 shost=rnddevsaw701.csgsecint.com src=10.7.4.10 sourceZoneID=ML8022AABABCDTFpYAT3UdQ\\=\\= sourceZoneURI=/All Zones/ArcSight System/Private Address Space Zones/RFC1918: 10.0.0.0-10.255.255.255 dst=10.7.2.20 destinationZoneID=ML8022AABABCDTFpYAT3UdQ\\=\\= destinationZoneURI=/All Zones/ArcSight System/Private Address Space Zones/RFC1918: 10.0.0.0-10.255.255.255 dpt=1177 fname=IDS Event filePath=/All Rules/Real-time Rules/RSA_2015/IDS Event fileType=Rule ruleThreadId=ovRgpUwBA
@matehat
matehat / too_many_warnings.ex
Created February 28, 2016 17:12 — forked from CharlesOkwuagwu/too_many_warnings.ex
too many warnings
defp send_messages(msg_list, s, do_timer_reset) do
if do_timer_reset do
if s.acks != [] do
ids = s.acks
s = %{s | acks: []}
log "adding acks: #{inspect ids}"
msg_list = msg_list ++ [{TL.msgs_ack(ids), false}]
end
# if s.resends != [] do
defmodule ISO.Mixfile do
use Mix.Project
def project do
[
app: :iso,
version: "0.1.0",
deps: deps
]
end
@matehat
matehat / Challenge.md
Last active November 22, 2015 21:31
Invotas Challenge

The response to this challenge should come in the form of links to [JSFiddles][1] for 1 and 2, and to a [Pastebin][3] for 3.

1. Stylesheets and HTML

Using [JSFiddle][1], create a <ul> element and 4 <li> children elements, and position them in order to meet the following constraints, without the help of external CSS libraries:

  1. The 4 children should each be using 20% of the available width
  2. They should be evenly spread horizontally.
  3. They should have different height
  4. They should be vertically aligned with respect to their Y centers.
@matehat
matehat / LevelDB.m
Last active August 29, 2015 14:04 — forked from jpsim/LevelDB.m
#import <Objective-LevelDB/LevelDB.h>
#import <Objective-LevelDB/LDBWriteBatch.h>
#include <mach/mach_time.h>
#include <stdint.h>
NSString *randomString(NSUInteger length) {
NSMutableString *string = [NSMutableString stringWithCapacity:length];
for (int i = 0; i < length; i++) {
[string appendFormat:@"%C", (unichar)('a' + arc4random_uniform(25))];
}
@matehat
matehat / Install_tmux
Created February 27, 2014 01:43 — forked from simme/Install_tmux
# First install tmux
brew install tmux
# For mouse support (for switching panes and windows)
# Only needed if you are using Terminal.app (iTerm has mouse support)
Install http://www.culater.net/software/SIMBL/SIMBL.php
Then install https://bitheap.org/mouseterm/
# More on mouse support http://floriancrouzat.net/2010/07/run-tmux-with-mouse-support-in-mac-os-x-terminal-app/
@matehat
matehat / erlang.rb
Created October 25, 2013 19:44 — forked from dch/erlang.rb
require 'formula'
class ErlangManuals < Formula
url 'http://erlang.org/download/otp_doc_man_R16B01.tar.gz'
sha1 '57ef01620386108db83ef13921313e600d351d44'
end
class ErlangHtmls < Formula
url 'http://erlang.org/download/otp_doc_html_R16B01.tar.gz'
sha1 '6741e15e0b3e58736987e38fb8803084078ff99f'
Pod::Spec.new do |s|
s.name = 'LevelDB-ObjC'
s.version = '0.0.1'
s.ios.deployment_target = '5.0'
s.osx.deployment_target = '10.6'
s.license = 'MIT'
s.summary = 'A minimal wrapper for LevelDB in Objective C.'
s.description = 'This is a simple wrapper for Google\'s LevelDB. LevelDB is a fast key-value store written by Google. This is a forked version for updated leveldb and XCode after 4.2.'
s.homepage = 'https://github.com/hoisie/LevelDB-ObjC'
s.author = 'Michael Hoisie'