Skip to content

Instantly share code, notes, and snippets.

View onsails's full-sized avatar
You only truly know it when you truly feel it

Andrey Kuznetsov onsails

You only truly know it when you truly feel it
View GitHub Profile
@onsails
onsails / cancelot.sh
Created May 17, 2020 00:55 — forked from siberex/cancelot.sh
Provides automation for cancelling previous ongoing Cloud Builds for the same branch/trigger
#!/usr/bin/env bash
# https://gist.github.com/siberex/bb0540b208019382d08732cc6dd59007
# Provides automation for cancelling Cloud Builds
# Use as a first step to cancel previous builds currently in progress or queued for the same branch name and trigger id.
# Similar to: https://github.com/GoogleCloudPlatform/cloud-builders-community/tree/master/cancelot
# Usage: cancelot.sh --current_build_id $BUILD_ID --branch_name $BRANCH_NAME --same_trigger_only
# Usage within Cloud Build step:
# steps:
@onsails
onsails / cancelot.sh
Created May 17, 2020 00:54 — forked from siberex/cancelot.sh
Provides automation for cancelling previous ongoing Cloud Builds for the same branch/trigger
#!/usr/bin/env bash
# https://gist.github.com/siberex/bb0540b208019382d08732cc6dd59007
# Provides automation for cancelling Cloud Builds
# Use as a first step to cancel previous builds currently in progress or queued for the same branch name and trigger id.
# Similar to: https://github.com/GoogleCloudPlatform/cloud-builders-community/tree/master/cancelot
# Usage: cancelot.sh --current_build_id $BUILD_ID --branch_name $BRANCH_NAME --same_trigger_only
# Usage within Cloud Build step:
# steps:
;; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Configuration Layers declaration.
You should not put any user code in this function besides modifying the variable
values."
(setq-default
;; Base distribution to use. This is a layer contained in the directory
# vim style tmux config
# use C-a, since it's on the home row and easier to hit than C-b
set-option -g prefix C-q
unbind-key C-a
bind-key C-a send-prefix
set -g base-index 1
# Easy config reload
bind-key R source-file ~/.tmux.conf \; display-message "tmux.conf reloaded."
@onsails
onsails / keybase.md
Created March 23, 2020 20:56
Keybase proof

Keybase proof

I hereby claim:

  • I am onsails on github.
  • I am onsails (https://keybase.io/onsails) on keybase.
  • I have a public key ASB6rONEaSfN8kccgh4_d0JO--3UvLW2-aFRwLgim6qTMQo

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am prettynatty on github.
  • I am tailrecursive (https://keybase.io/tailrecursive) on keybase.
  • I have a public key ASAGahS2CTTOKNXSuyAheGhAMGBPwsgVhqt_1l8ZXk2cUAo

To claim this, I am signing this object:

@onsails
onsails / replace-debian-with-arch.txt
Created January 28, 2016 16:38 — forked from m-ou-se/replace-debian-with-arch.txt
Instructions to replace a live Debian installation with Arch
# Download latest archlinux bootstrap package, see https://www.archlinux.org/download/
wget http://ftp.nluug.nl/os/Linux/distr/archlinux/iso/2016.01.01/archlinux-bootstrap-2016.01.01-x86_64.tar.gz
# Make sure you'll have enough entropy for pacman-key later.
apt-get install haveged
# Install the arch bootstrap image in a tmpfs.
mount -t tmpfs none /mnt
cd /mnt
tar xvf ~/archlinux-bootstrap-2016.01.01-x86_64.tar.gz --strip-components=1
@onsails
onsails / cats-dbio.scala
Last active January 19, 2016 21:16
cats-dbio.scala
package im.actor.cats
import cats._
import cats.data.Xor
import cats.data.Xor._
import cats.syntax.all._
import slick.dbio.{ DBIO, FailureAction, SuccessAction }
import scala.concurrent.ExecutionContext
import scala.reflect.ClassTag
@onsails
onsails / gist:1fb526ac1cbddcd63bef
Created June 2, 2015 17:16
Deferred notifications demo
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>notif</title>
</head>
<body id="notif" onload="">
<input id="new-notif" type="button" value="Show notification"/>
<script type="text/javascript">
'use strict';
@onsails
onsails / gist:10119638
Last active August 29, 2015 13:58
Simple nooby sitemap printer sample
import Network.HTTP.Conduit
import qualified Data.ByteString.Lazy as L
import Text.XML.Light
import Control.Monad.Trans (liftIO)
import Control.Monad
import Data.String.Utils
import Control.Exception
import Control.Monad.Trans.Resource
import Control.Monad.Trans.Class