Skip to content

Instantly share code, notes, and snippets.

View gz's full-sized avatar

Gerd Zellweger gz

View GitHub Profile
@fnky
fnky / ANSI.md
Last active May 8, 2024 15:42
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@anttikantee
anttikantee / gist:15259b8796eb724722e3
Created May 20, 2015 17:17
dmesg for rumprun/nginx unikernel booting on bare metal from USB stick
rumpctrl (tcp://192.168.2.106:12345)$ sysctl -r kern.msgbuf
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015
The NetBSD Foundation, Inc. All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
The Regents of the University of California. All rights reserved.
NetBSD 7.99.17 (RUMP-ROAST)
total memory = 1004 MB
timecounter: Timecounters tick every 10.000 msec
@kidpixo
kidpixo / jupyter_shortcuts.md
Last active April 7, 2024 12:18
Keyboard shortcuts for ipython notebook 3.1.0 / jupyter

Warning This is SEVERELY outdated, the current jupyter version is > 6.X, please refer to your current jupyter notebook installation!

Disclaimer : I just copied those shortcuts from Jupyter Menú > Help > Keyboard Shortcuts, I didn't wrote them myself.

Check your current shortcuts in your Help, shortcuts coule have been modified by extensions or your past self.

Toc

Keyboard shortcuts

Or what the hell do #![no_start], #![no_main], #[lang = "start"], #[start], and #[main] do?

Crate Attributes:

#![no_start]

Disable automatically linking in the native crate and thus the default start lang item.

Which means you'll probably need one of: #![no_main], #![lang = “start”] or #[start] instead

@fperez
fperez / ProgrammaticNotebook.ipynb
Last active May 2, 2024 19:14
Creating an IPython Notebook programatically
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@steeve
steeve / _readme.md
Last active March 7, 2024 12:38
How to cross compile Go with CGO programs for a different OS/Arch

How to cross compile Go with CGO programs for a different OS/Arch

It is possible to compile Go programs for a different OS, even though go build says otherwise.

You'll need:

@Lysander
Lysander / md_to_moinmoin.rb
Created May 13, 2012 16:12
Small Converter to generate markdown for MoinMoin from github's markdown dialect using Redcarpet.
#!/usr/bin/env ruby
require 'redcarpet'
class MoinMoin < Redcarpet::Render::Base
def header(text, level)
prefix = "=" * level
"\n\n#{prefix} #{text} #{prefix}\n"