Skip to content

Instantly share code, notes, and snippets.

View zeromancer1972's full-sized avatar

Oliver Busse zeromancer1972

View GitHub Profile
@zeromancer1972
zeromancer1972 / oled_thermo.ino
Created March 7, 2021 22:18
This gist drives a SSD1306 OLED with values coming from a ESP8266 (Wemos D1 Mini) given by a DHT22 temp/humidity sensor.
/**************************************************************************
This is an example for our Monochrome OLEDs based on SSD1306 drivers
Pick one up today in the adafruit shop!
------> http://www.adafruit.com/category/63_98
This example is for a 128x32 pixel display using I2C to communicate
3 pins are required to interface (two I2C and one reset).
Adafruit invests time and resources providing this open
@zeromancer1972
zeromancer1972 / make_keyring.sh
Created February 8, 2019 08:57
Proton Keyring Script
#!/bin/bash -eu
##########################################################################
# #
# Licensed Materials - Property of HCL #
# #
# (c)Copyright HCL Technologies Ltd. 2018. All Rights Reserved. #
# #
# Note to U.S.Government Users Restricted Rights : #
# Use, duplication or disclosure restricted by GSA ADP Schedule #
# Contract with IBM Corp. #
<?xml version="1.0" encoding="UTF-8"?>
<xp:view
xmlns:xp="http://www.ibm.com/xsp/core">
<xp:panel
id="panel1">
<xp:viewPanel
rows="30"
id="viewPanel1">
<xp:this.facets>
<xp:pager
<?xml version="1.0" encoding="UTF-8"?>
<xp:view
xmlns:xp="http://www.ibm.com/xsp/core">
<xp:panel
id="panel1">
<xp:viewPanel
rows="30"
id="viewPanel1">
<xp:this.facets>
<xp:pager
@zeromancer1972
zeromancer1972 / ccDocActions_DE.xsp
Created January 28, 2015 15:50
ccDocActions_DE
<?xml version="1.0" encoding="UTF-8"?>
<xp:view
xmlns:xp="http://www.ibm.com/xsp/core">
<xp:div>
<xp:button
value="Speichern"
id="button1"
rendered="#{javascript:currentDocument.isEditable()}">
<xp:eventHandler
event="onclick"
// DataTables init
$(document).ready( function() {
var table = $("#datatable").dataTable( {
"language" : {
"lengthMenu" : "Records per page _MENU_",
"zeroRecords" : "Nothing found - sorry",
"info" : "Page _PAGE_ of _PAGES_",
"infoEmpty" : "No records available",
"infoFiltered" : ""
},
<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core">
<!-- Bearbeitungsvermerke -->
<div class="row">
<div class="col-sm-10">
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">Zuarbeiten</h4>
</div>
<div class="panel-body">
@zeromancer1972
zeromancer1972 / gist:e0250e791db245eb3c2f
Last active August 29, 2015 14:06
GitHubController class
package org.openntf.github.xsp;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.Serializable;
import org.apache.http.client.config.RequestConfig;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.CloseableHttpClient;
@zeromancer1972
zeromancer1972 / gist:8d9d1fa6b2924dcc1c7c
Created September 27, 2014 19:20
GitHubProfile class
package org.openntf.github.model;
import java.io.Serializable;
public class GitHubProfile implements Serializable {
private static final long serialVersionUID = 3578007780249316980L;
private String login;
private int id;
<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core">
<xp:scriptBlock id="scriptBlock1">
<xp:this.src><![CDATA[#{javascript:return "/"+database.getFilePath().replace(/\\/g, "/")+"/test.js";
}]]></xp:this.src>
</xp:scriptBlock>
<xp:scriptBlock id="scriptBlock2">
<xp:this.src><![CDATA[#{javascript:return "/"+session.evaluate("@WebDbName").elementAt(0).toString()+"/test.js";}]]></xp:this.src>
</xp:scriptBlock>