Skip to content

Instantly share code, notes, and snippets.

View bernii's full-sized avatar

Bernard Kobos bernii

View GitHub Profile
@bernii
bernii / main.rs
Created March 8, 2022 18:01
esp now tests with esp-rs
use std::convert::TryInto;
use std::process;
use esp_idf_sys::{self as _, c_types}; // If using the `binstart` feature of `esp-idf-sys`, always keep this module imported
use std::net::Ipv4Addr;
use std::{sync::Arc, thread, time::*};
use anyhow::bail;
use log::*;
use embedded_svc::ipv4;
use embedded_svc::wifi::*;
$ git diff
diff --git a/docker-compose.yml b/docker-compose.yml
index f7991e7303..61dfbcdf5a 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -9,7 +9,7 @@ services:
mysql:
image: mysql:5
ports:
- - "3306"
@bernii
bernii / pr_template.md
Last active October 30, 2015 17:24
PR template

Ticket: WEB-XYZ @reviewer_handle please review [optional extra comments for reviewer]

Problem

Description of the problem that this code change is solving

Solution

GIF OR IMAGE IF POSSIBLE HERE

@bernii
bernii / WebdriverSample.java
Last active December 18, 2015 00:29
Sample Webdriver Java example with custom-data / rest call public job: https://saucelabs.com/tests/bfb53744b3474162bf3cf3f6f4b1cb8d
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import org.apache.commons.codec.binary.Base64;
import org.openqa.selenium.By;
@bernii
bernii / sauce-osx-test.js
Created February 26, 2013 23:03
WD.js with OSX - keys fails - workaround
var wd = require('wd')
, Q = require('q')
, request = require('request')
, assert = require('assert')
, host = "ondemand.saucelabs.com"
, port = 80
, username = YOUR_USERNAME
, accessKey = YOUR_ACCESS_KEY
// using promisified version of webdriver
, browser = wd.promiseRemote(host, port, username, accessKey);
@bernii
bernii / sauce-jasmine-example.js
Last active December 13, 2015 16:58
Example code using WD.js and Jasmine with Sauce Labs
// You need to have the following installed:
// https://github.com/admc/wd
// https://github.com/kriskowal/q
var wd = require('wd')
, Q = require('q')
, request = require('request')
, assert = require('assert')
, host = "ondemand.saucelabs.com"
, port = 80
@bernii
bernii / sauce-qunit-example.js
Last active December 13, 2015 16:59
Example code using WD.js and QUnit with Sauce Labs
// You need to have the following installed:
// https://github.com/admc/wd
// https://github.com/kriskowal/q
var wd = require('wd')
, Q = require('q')
, request = require('request')
, assert = require('assert')
, host = "ondemand.saucelabs.com"
, port = 80
@bernii
bernii / code128.py
Created April 15, 2012 19:21 — forked from ekarulf/code128.py
Code128 Python Generator (Uses PIL)
#!/usr/bin/env python
# Copyright (c) 2010 Erik Karulf (erik@karulf.com)
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR