Skip to content

Instantly share code, notes, and snippets.

@nexeck
nexeck / osx-wipe_disk.md
Last active January 24, 2021 11:06
OSX - Secure Wipe Disk

Securely erase a disk using onboard tools on OSX

  1. Plug in your external storage and use the following command to see which /dev/diskN node it's located on:
diskutil list
  1. Unmount the disk where Nis the number of the disk
@nexeck
nexeck / stellaris-rss-tree.gv
Created January 14, 2021 22:09
Stellaris RSS Tree
digraph G {
rankdir = TB;
{rank = same; Food; Electriticty; Minerals; Gas; Gel; Metal; Hyperium; Titanium; "Aldar Crystal"; "Lythuric Gas"; "Yurantic Crystal"; "Gray Dust";}
splines="ortho";
"Food" -> "Product"[taillabel=3];
"Electriticty" -> "Alloy"[taillabel=4];
#cloud-config
ssh_authorized_keys:
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCgRGVud71r1O5liHTFeSbOzRnDFllFwIXVrzXy9rJ7ErtWFn8qCQgrbiGITU55yc0ANimsl3v6Dp0pstosYtBdbYXOU7q8SzULv8obvI2PKMKBYrShPZrK6+9Nhpbc7ATeRIKGD1RtaX4ZxZSP9h64uIM71zuTuHwz5q3wTr96I0hUa4sJb4xWuVGWSO4yrCByOriBJ6rCHOraH53yy4G6J7R+52hBPxgl/2SeAokrYw95vxJ4aire0ecolwLSHTg2Dx4OdBxM0skFznU0eQPuFrGgLU/f8YSmTSEWo8CIap3/QXFyL/eaI3xEoEt25E5d7ecgW/6FozPHInhn4ITzlCoFjIeEW89Z9Uj0tk/x0or1EbLbisXzFLiE7B+tKcT1TjTWLQvUzx53yWzESYenLkGeSi0Z1KhuaYUkxpLGm8RUuTylgrmklMUDWG0PhxMX8I8ZDcyioB/n+VlIzp5ILzUndtJsYEySeud0XMVYwDvQPKAOoiJ76TOitwvHzfEaggeMJ+NnwcvNV8zq+U7d18JVqukuvsDusPR0Pptu7h4tLVRlp1dVnPojTDoorQpltdmw4IRYGgDv3aTbd4GQdJr2ofldblzlWiSVgobFjU7Hkgqh3VZts2rxSbf7Vs4IQX3GZ+b56HrAl5yaaX2BxAyCGdvRHYr5WzKUlUF5Ow== cardno:000608621247
rancher:
network:
dns:
nameservers:
- 1.1.1.1

Keybase proof

I hereby claim:

  • I am nexeck on github.
  • I am nexeck (https://keybase.io/nexeck) on keybase.
  • I have a public key ASAtIJt6TshIa7-oDn45cL9lGmuPEw7PK4-_okqOdmJQVgo

To claim this, I am signing this object:

diff --git a/app/controllers/projects/merge_requests_controller.rb b/app/controllers/projects/merge_requests_controller.rb
index 51509ec..e4a472e 100644
--- a/app/controllers/projects/merge_requests_controller.rb
+++ b/app/controllers/projects/merge_requests_controller.rb
@@ -166,7 +166,11 @@ class Projects::MergeRequestsController < Projects::ApplicationController
end
def ci_status
- status = @merge_request.source_project.gitlab_ci_service.commit_status(merge_request.last_commit.sha)
+ if @merge_request.source_project.gitlab_ci?
for f in $(find $1 -iname "*.wsp"); do
if [ -a $f ];
then /opt/graphite/bin/whisper-set-aggregation-method.py $f max;
fi;
done
@nexeck
nexeck / GitLog2JSON.sh
Last active December 16, 2015 09:49
Generate valid JSON from git log
#!/bin/sh
git log --pretty=format:'"%h":{"commit": "%H", "authorDate": "%ad", "authorDateTime": "%ai", "authorName": "%an", "subject": "%s"}' --date=short | sed 's/\\/\\\\/g' | gawk 'match($0, /(.*"subject": ")(.*)("})/, ary) {printf "%s%s%s\n", ary[1], gensub("\"","~","g",ary[2]), ary[3]}' | sed -e '1s/^/{/g;s/$/,/g;$s/,$/}/g'
/*
Orginally by cginzel at the Sencha Forums
http://www.sencha.com/forum/member.php?20865-cginzel
I'm playing with NodeJS and Connect which has an JSONRPC provider and so I managed to coble this proxy and reader together that I was able to successfully use to retrieve data into a grid. But I'm moving onto building an Ext.Direct provider instead so it'll be easier to build out the GUI. But for posterity's sake, I thought I'd post this code here just in case anyone else might find it useful.
I don't intend to support it, so use it at your own risk!
@nexeck
nexeck / gist:3690958
Created September 10, 2012 13:38
Relative URLs in Javascript
<!DOCTYPE html>
<html lang="en">
<head>
<base href="<?php echo URL::Base(); ?>" />
</head>
<body>
<div id="content" />
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script>
<script type="text/javascript">
<?php
/**
* Created by JetBrains PhpStorm.
* User: mbeck
* Date: 01.04.12
* Time: 10:08
*/
error_reporting(E_ALL);
ini_set("display_errors", 1);