Skip to content

Instantly share code, notes, and snippets.


guyzmo guyzmo

View GitHub Profile
guyzmo /
Created May 28, 2017
Connect to Wifi networks using network manager listed by fzf
local ssid
local conn
nmcli device wifi rescan > /dev/null
ssid=$(nmcli device wifi list | tail -n +2 | grep -v '^ *\B--\B' | fzf -m | sed 's/^ *\*//' | awk '{print $1}')
if [ "x$ssid" != "x" ]; then
# check if the SSID has already a connection setup
conn=$(nmcli con | grep "$ssid" | awk '{print $1}' | uniq)
guyzmo /
Created Apr 27, 2017
Afew Filter: Auto-tag thread filter
#!/usr/bin/env python
# coding=utf-8
from __future__ import print_function, absolute_import, unicode_literals
from afew.filters.BaseFilter import Filter
from afew.FilterRegistry import register_filter
guyzmo / test.html
Created Apr 20, 2017
Example of title failure
View test.html
<!DOCTYPE html>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta content="text/html; charset=utf-8" http-equiv="content-type">
<title>Status Constitutifs — {{Company_Name}}</title>
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
guyzmo / float_random.adb
Last active Mar 10, 2017
float_random snippet
View float_random.adb
with Ada.Numerics.Float_Random;
Seed : Ada.Numerics.Float_Random.Generator;
delay Duration (Ada.Numerics.Float_Random.Random (Seed) * 0.500);
guyzmo / exercise_advanced_checkpoint.adb
Created Mar 10, 2017
exercise advanced checkpoint
View exercise_advanced_checkpoint.adb
-- Consider a workshop where several workers (tasks) assembly details of some mechanism. When each of them completes his work they put the details together. There is no store, so a worker who finished its part first must wait for others before starting another one. Putting details together is the checkpoint at which tasks synchronize themselves before going their paths apart.
-- The task
-- Implement checkpoint synchronization in your language.
-- Make sure that the solution is race condition-free.
-- Note that a straightforward solution based on events is exposed
-- to race condition. Let two tasks A and B need to be synchronized
-- at a checkpoint. Each signals its event (EA and EB correspondingly),
-- then waits for the AND-combination of the events (EA&EB) and resets
-- its event. Consider the following scenario: A signals EA first and
View int_list_pkg.adb
package Int_List_Pkg is
type Int_List (Max_Length : Natural) is private
with Type_Invariant => Is_Sorted (Int_List);
function Is_Sorted (List : Int_List) return Boolean;
type Int_array is array (Positive range <>) of Integer;
function To_Int_List (Ints : Int_Array) return Int_List;
guyzmo / build.log
Created Mar 6, 2017
gprbuild build log
View build.log
-> Found Makefile.archy
-> Found
==> Validating source files with sha1sums...
57399662c7a447658e0affa8 ... Passed
Makefile.archy ... Passed ... Passed
==> Extracting sources...
-> Extracting 57399662c7a447658e0affa8 with bsdtar
==> Starting prepare()...
patching file
guyzmo / busted_functional.log
Created Feb 19, 2017
first functional test case for neomutt
View busted_functional.log
13 successes / 0 failures / 0 errors / 0 pending : 0.020419 seconds
guyzmo / busted.log
Last active Feb 19, 2017
first unit test case for neomutt
View busted.log
5 successes / 0 failures / 0 errors / 0 pending : 0.099498 seconds
guyzmo /
Created Feb 18, 2017
IPv6 Connection issue to
* Rebuilt URL to:
* Trying
* Connected to ( port 443 (#0)
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
* CAfile: /etc/ssl/certs/ca-certificates.crt
CApath: none
* TLSv1.2 (OUT), TLS header, Certificate Status (22):