Skip to content

Instantly share code, notes, and snippets.

On the verge

Chigozirim C. smac89

On the verge
Block or report user

Report or block smac89

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
smac89 /
Last active Feb 23, 2019
Updated script for installing Canon Printer drivers on Ubuntu

##Canon MF632CDW Driver download

When using the script to install the drivers on Ubuntu, the script will tend to use yum and rpm to carry out the installation.

I find it strange that these package managers were installed on my system in the first place, but I did not remove them incase they are used for something important.

The changes made removes those checks for yum and rpm thus forcing the script to use the apt and deb for Debian systems such as Ubuntu and variants.

smac89 / strace_zsh.log
Last active Dec 28, 2018
Trace of opening zsh in vscode
View strace_zsh.log
This file has been truncated, but you can view the full file.
execve("/bin/zsh", ["/bin/zsh"], 0x7ffd981fa0f0 /* 126 vars */) = 0
brk(NULL) = 0x561ce13fc000
access("/etc/", F_OK) = -1 ENOENT (No such file or directory)
access("/etc/", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=308693, ...}) = 0
mmap(NULL, 308693, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7feb9b74b000
close(3) = 0
access("/etc/", F_OK) = -1 ENOENT (No such file or directory)
smac89 /
Last active Aug 15, 2018
#IntelliJ #idea Structural search tips.

Find field references on an instance

In this example, we want to find places where one did:


Where someClass is of the type fully.qualified.SomeClass

Find and replace field reference with method call
smac89 /
Created Aug 7, 2018
Exporting libreoffice calc sheet as image #libreoffice #export #image

We start with this spreadsheet:

screenshot from 2018-08-07 16-43-15

Next we select the range to export:

screenshot from 2018-08-07 16-44-11

Next we click File > Export:

smac89 /
Last active Aug 2, 2018
Teamspeak server setup on Linux Ubuntu 16.04. #teamspeak #server #ts3

Downloading teamspeak

Since the server will likely not have a UI, so the download must be done with a command

The command to download teamspeak (Find the most recent version and download instead):

wget -O teamspeak-server.tar.bz2

Setting up teamspeak folder

smac89 /
Created Jun 7, 2018
Set up an #ssh #server with public key encryption


Create the user group and add the users you want to be part of this group:

sudo groupadd sshusers
sudo usermod -a -G sshusers <username>


# Generate key and create password
smac89 /
Last active May 30, 2018
Things to try when Gnome shell freezes or becomes unresponsive
View java_error_in_PYCHARM_11693.log
# A fatal error has been detected by the Java Runtime Environment:
# SIGSEGV (0xb) at pc=0x00007ff2908189fa, pid=11693, tid=0x00007ff24cf43700
# JRE version: OpenJDK Runtime Environment (8.0_152-b11) (build 1.8.0_152-release-1024-b11)
# Java VM: OpenJDK 64-Bit Server VM (25.152-b11 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# v ~BufferBlob::jni_fast_GetLongField
smac89 /
Created Feb 5, 2018
Java sliding windows via Streams
import java.util.List;
public class Main {
public static void main(String args[]) {
Stream<List<Integer>> stream = SlidingWindow.pagedStream(StreamableSupplier.fromStream(IntStream.range(1, 10000).boxed()), 5)
.apply(i -> i <= 100);
View data.json
{"id":"2dd8e4ec-b6bc-466f-86cc-ca4465950e09","first_name":"Olympie","last_name":"de Guerre","email":"","gender":"Female","class_count":3},
You can’t perform that action at this time.