Skip to content

Instantly share code, notes, and snippets.

View yogsototh's full-sized avatar

Yann Esposito yogsototh

View GitHub Profile
# This isn't meant to be ran as a script, but line-by-line
# Props to Binary (benary.org) for helping me with this
# 0: Create a Scaleway instance and SSH into it
ssh root@...
# 1: Install Nix
apt-get install bzip2
adduser user # set a password, doesn't matter what because it's not staying long
adduser user sudo
@yogsototh
yogsototh / swagger.json
Last active September 30, 2017 21:56
swagger-3.x-bug
{
"swagger": "2.0",
"info": {
"version": "1.0",
"title": "RedBot Configuration API"
},
"paths": {
"/redbot/{bot-id}": {
"get": {
"tags": [
@yogsototh
yogsototh / keybase.md
Created December 12, 2016 14:27
keybase.md

Keybase proof

I hereby claim:

  • I am yogsototh on github.
  • I am yogsototh (https://keybase.io/yogsototh) on keybase.
  • I have a public key ASB9axNN7YTw6AKkfRe8lAepI3rGMErpBB1wiqJavQVmAAo

To claim this, I am signing this object:

@yogsototh
yogsototh / Tuto.md
Last active May 30, 2023 12:07
Starting Emacs in GUI with shell environment variables correctly set

Problem

When starting Emacs.app on Mac, the Emacs doesn't have some environment variable set correctly. Typically it is terrible when you use GPG, pinentry-mac, gpg-agent But also a lot of different variables used to make git works correctly, etc...

Solution

  1. Create the file ~/bin/init-app-env.sh:
@yogsototh
yogsototh / jobs.md
Last active October 10, 2016 10:41
ThreatGRID/Cisco Jobs

Intro

The Advanced Threat Security Team in Cisco's Security Business Group is building a global scale, multi-product security platform with an emphasis on Threat Intelligence and Incident Response support.

Our system runs as a distributed cluster in the cloud, and shrunk down to a single on-premises appliance. This keeps us focused on simple solutions, clear abstractions between services, composition of

(ns mtest.handler
(:require [compojure.api.sweet :refer :all]
[ring.util.http-response :refer :all]
[schema.core :as s]))
(s/defschema Pizza
{:name s/Str
(s/optional-key :description) s/Str
:size (s/enum :L :M :S)
:origin {:country (s/enum :FI :PO)
@yogsototh
yogsototh / commit-msg
Last active June 23, 2016 18:40
enforce commit message to start with issue number
#!/bin/bash
#
# This file should be in .git/hooks/commit-msg
# It uses the current branch name to prefix the commit message.
name=$(git rev-parse --abbrev-ref HEAD | sed 's/\(issue-[0-9]*\).*/\1/')
if [ $name != 'HEAD' ]; then
cat $1 | sed "s/^$name: //" | egrep -v "^#" > $1.tmp
echo -n "$name"': ' > $1
cat $1.tmp >> $1
@yogsototh
yogsototh / metrics.json
Last active June 16, 2016 15:34
JSON from metrics-clojure
{
"ring.handling-time.CONNECT": {
"max": 0,
"mean": 0.0,
"min": 0,
"percentiles": {
"0.75": 0.0,
"0.95": 0.0,
"0.99": 0.0,
"0.999": 0.0,
@yogsototh
yogsototh / README.md
Created February 10, 2016 12:50
Add Java Certificate

Add Java Cacert

Use the preceeding script when you get

SSLHandshakeException javax.net.ssl.SSLHandshakeException: General SSLEngine problem

You generally need to add the certificate for the website you want to add.

@yogsototh
yogsototh / app.elm
Created May 28, 2015 13:53
Error: the notify function has been called synchronously!
import Signal exposing (Address,Mailbox,mailbox)
import Html exposing (..)
import Html.Attributes exposing (..)
import Html.Events exposing (onClick,on,targetValue)
import Task exposing (Task,andThen)
import Http exposing (multipart,stringData)
import Time exposing (every,second)
main : Signal Html