Skip to content

Instantly share code, notes, and snippets.

View gnull's full-sized avatar
💭
I moved from Github to Sourcehut and suggest you do the same

Ivan Oleynikov gnull

💭
I moved from Github to Sourcehut and suggest you do the same
View GitHub Profile
@gnull
gnull / test.md
Created January 24, 2024 18:22
markdown test

Note

Highlights information that users should take into account, even when skimming.

### Keybase proof
I hereby claim:
* I am gnull on github.
* I am ph14nix (https://keybase.io/ph14nix) on keybase.
* I have a public key ASD_jCqn6gZMq2ZhDG0rVEO3d_AMkdy-FVjk1G4MSzEEeQo
To claim this, I am signing this object:
#!/bin/bash
# shellcheck disable=SC2059
#
#.USAGE
# To start, run:
# wget https://raw.githubusercontent.com/danielewood/sierra-wireless-modems/master/autoflash-7455.sh && sudo bash autoflash-7455.sh
#.SYNOPSIS
# - Only for use on Ubuntu 20.04 (or later) LiveUSB
# - Changes all models of EM7455/MC7455 Modems to the Generic Sierra Wireless VID/PID
#!/bin/sh -xefu
# https://stackoverflow.com/questions/61385594/create-pdf-where-each-page-is-a-merge-of-image-and-a-svg-file
# https://stackoverflow.com/questions/501723/overlay-one-pdf-or-ps-file-on-top-of-another
# https://superuser.com/questions/381125/how-do-i-convert-an-svg-to-a-pdf-on-linux
# http://notesofaprogrammer.blogspot.com/2017/03/converting-svg-to-pdf-on-linux-command.html
mkdir -p res/ready
for i in $(seq 1 242); do
#!/bin/sh -efux
# This file works only with IPv4. The variables in capitals are the parameters
# you can adjust to your needs
# The name of the modem network interface as shown in `ip a`
INTERFACE=wwp0s20f0u3i12
# The access point address. This is the same value as the one you typically
# have in the internet settings of your mobile phone.
@gnull
gnull / lolcat.hs
Created May 27, 2017 13:34 — forked from shiroginne/lolcat.hs
simple lolcat powered by haskell
import Data.Word
freq = 0.3
spread = 8.0
unbase :: Integral int => int -> Word8 -> Word8 -> Word8 -> int
unbase base r g b = (fi r*base+fi g)*base+fi b
where fi = fromIntegral
-- | Approximate a 24-bit Rgb colour with a colour in the xterm256 6x6x6 colour cube, returning its index.
@gnull
gnull / lazy-async.hs
Created April 19, 2017 17:00
Haskell lazy async
import Control.Concurrent.Async
import Control.Monad
sites = ["http://www.google.com",
"http://www.bing.com",
"http://www.yahoo.com",
"http://www.wikipedia.com/wiki/Spade",
"http://www.wikipedia.com/wiki/Shovel"]
printRepeat :: String -> IO [String]
@gnull
gnull / MaybeSum.hs
Created February 14, 2017 19:47
Sum of two Maybe values in CLaSH
module Maybe where
import Data.Functor
import Control.Applicative
import CLaSH.Prelude
sol :: Maybe Int -> Maybe Int -> Maybe Int
sol a b = (+) <$> a <*> b
@gnull
gnull / trace.txt
Created June 5, 2016 21:14
Perl6 stack trace
======= Backtrace: =========
/lib/i386-linux-gnu/libc.so.6(+0x756fb)[0xb72c96fb]
/lib/i386-linux-gnu/libc.so.6(+0x76440)[0xb72ca440]
/lib/i386-linux-gnu/libc.so.6(closedir+0x28)[0xb72f41f8]
/home/gnull/prefix/lib/libmoar.so(MVM_dir_close+0x41)[0xb74b9321]
/home/gnull/prefix/lib/libmoar.so(MVM_interp_run+0xa9d4)[0xb747e6a4]
/home/gnull/prefix/lib/libmoar.so(+0xac0d2)[0xb74980d2]
/home/gnull/prefix/lib/libmoar.so(+0x17e6f0)[0xb756a6f0]
/lib/i386-linux-gnu/libpthread.so.0(+0x6a0d)[0xb71fda0d]
/lib/i386-linux-gnu/libc.so.6(clone+0x5e)[0xb732dece]