Skip to content

Instantly share code, notes, and snippets.

@Ilgrim
Ilgrim / TestResolver.java
Created Oct 16, 2020 — forked from glucn/TestResolver.java
Mock DNS Server in Java - test code
View TestResolver.java
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.xbill.DNS.DClass;
import org.xbill.DNS.ExtendedResolver;
import org.xbill.DNS.Lookup;
import org.xbill.DNS.Message;
import org.xbill.DNS.Name;
import org.xbill.DNS.Record;
View data-driven-rest-api-test-2_Robot-Framework.robot
#! Robot Framework
*** Settings ***
Metadata Version 0.1.0
Metadata Author *Tset Noitamotua*
Metadata Created 2019.01.23
Documentation Demo - Data Driven Test with RF
...
@Ilgrim
Ilgrim / .Xresources
Created Sep 26, 2020 — forked from liangzan/.Xresources
Xresources for configuring urxvt
View .Xresources
! urxvt
URxvt*buffered: true
URxvt*cursorBlink: true
URxvt*underlineColor: yellow
URxvt*font: xft:inconsolata:size=10:antialias=true
URxvt*depth: 32
URxvt*borderless: 1
URxvt*scrollBar: false
URxvt*loginShell: true
Urxvt*secondaryScroll: true # Enable Shift-PageUp/Down in screen
View gist:b2a51523002d1dff2947c287ed0bafef
#include <string>
#include <iostream>
int main() {
using std::string;
std::string umlauts_small = u8"äöü";
std::string umlauts_capital = u8"ÄÖÜ";
auto foo = umlauts_small + "|" + umlauts_capital;
@Ilgrim
Ilgrim / ecs.md
Created Sep 11, 2020 — forked from paniq/ecs.md
Entity Component Systems
View ecs.md
@Ilgrim
Ilgrim / chr_led.c
Created Sep 4, 2020 — forked from itrobotics/chr_led.c
a simple linux driver example code which is a char dev to control GPIO-LED on Raspberry Pi
View chr_led.c
// Simple Character Device Driver Module for Raspberry Pi.
/*
* DESCRIPTION:
* a simple example of char device
* this char device can control the GPIO by file operation : write
* to write specific message as command
* */
#include <linux/module.h>
#include <linux/string.h>
@Ilgrim
Ilgrim / gmail.py
Created Jul 19, 2020 — forked from ib-lundgren/gmail.py
How to fetch emails from GMail using an OAuth 2 Bearer token and GMails SASL XOAuth2 mechanism.
View gmail.py
"""Fetching the latest GMail email using OAuth 2 and IMAP.
Requires requests-oauthlib, which is available on pypi.
Includes a basic SASL XOAUTH2 authentication method for imaplib.
"""
# Credentials you get from registering a new web application in Google API Console
client_id = 'your-id.apps.googleusercontent.com'
client_secret = 'your secret'
redirect_uri = 'your callback uri'
@Ilgrim
Ilgrim / Mercurial.ini
Created Jun 24, 2020 — forked from nfreear/Mercurial.ini
Mercurial.ini / .hgrc - HG configuration file
View Mercurial.ini
# Mercurial configuration.
[http_proxy]
#host = wwwcache.open.ac.uk:80
[ui]
username = Nick Freear <ME@example.org>
# Editor - I'll use vi for now!
@Ilgrim
Ilgrim / README.md
Created Jun 19, 2020 — forked from Jxck/README.md
libuv TCP server/client sample
View README.md

how to compile

$ gcc -g -Wall -I /path/to/libuv/include /path/to/libuv/uv.a -framework CoreServices server.c -o server
$ gcc -g -Wall -I /path/to/libuv/include /path/to/libuv/uv.a -framework CoreServices client.c -o client
@Ilgrim
Ilgrim / asynchronous_example.py
Created May 11, 2020 — forked from tylerburdsall/asynchronous_example.py
Example showing asynchronous HTTP request with Python 3.5.0 + asyncio
View asynchronous_example.py
import requests
import asyncio
from concurrent.futures import ThreadPoolExecutor
from timeit import default_timer
START_TIME = default_timer()
def fetch(session, csv):
base_url = "https://people.sc.fsu.edu/~jburkardt/data/csv/"
with session.get(base_url + csv) as response:
You can’t perform that action at this time.