Skip to content

Instantly share code, notes, and snippets.

View schafeld's full-sized avatar
🏗️
Playing with LLMs, busy chatbot-building...

Oliver Schafeld schafeld

🏗️
Playing with LLMs, busy chatbot-building...
View GitHub Profile
@schafeld
schafeld / quizscript
Created October 12, 2013 14:13
A simple script describing a quiz. Meant to be loaded by remote quiz software.
var quiz = [
{
ques: "Silver", //question
ans: "Ag", // answer
ansInfo : "<br/>More info <a href='http://www.periodictable.com/Elements/079/index.html'>here</a>" // answer information.
},
{
ques: "Gold.",
ans: "Au",
ansInfo : "Gold-Au <br/>More info <a href='http://www.periodictable.com/Elements/079/index.html'>here</a>"
@schafeld
schafeld / List all SVN-URLs
Created March 24, 2015 15:04
List all SVN-URLs of folders in current directory
for dirname in `ls -d */`; do svn info ${dirname} | grep "URL:" -m 1; done;
@schafeld
schafeld / weather-api.nodered
Created March 17, 2017 13:46
Node Red scriptlet for requesting weather information from OpenWeatherMap API.
[{"id":"78ee8651.692618","type":"inject","z":"469bc24d.c9b79c","name":"Request Weather Data","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":169.5,"y":94,"wires":[["f0f273bd.ed46e"]]},{"id":"f0f273bd.ed46e","type":"http request","z":"469bc24d.c9b79c","name":"OpenWeather API","method":"GET","ret":"txt","url":"http://api.openweathermap.org/data/2.5/weather?q=Cologne,DE&units=metric&APPID=000_YOUR_API_KEY_GOES_HERE_000","tls":"","x":261.5,"y":213,"wires":[["294c54f6.e5b17c","9ec7b5a5.4504b8"]]},{"id":"294c54f6.e5b17c","type":"function","z":"469bc24d.c9b79c","name":"Output Filter: Temperature in Celsius","func":"// Parse OpenWeatherMap JSON answer\nvar weather=JSON.parse(msg.payload);\n \n// Create string with embedded data\nvar newMsg = { payload: \"Current temperature in Cologne is \"+weather.main.temp + \"° Celcius.\" };\n \n// Return formatted message string\nreturn newMsg;\n","outputs":1,"noerr":0,"x":480.5,"y":297,"wires":[["650f3bae.4ea624"]]},{"id":"650f3bae.4ea624",
@schafeld
schafeld / index.html
Created March 28, 2017 13:20
WiP: x-tag x-countdown
<x-countdown endTime="20170414Z23:59:00"></x-countdown>
<p id="end-time">XXX</p>
<p>TODO: Refactor into countdown component with starting and ending time as component attributes.</p>
<p>JS dependency: https://rawgit.com/x-tag/core/master/dist/x-tag-core.js</p>
<p>DRETRO-9</p>
@schafeld
schafeld / codepen-react-boilerplate-wip-todo-list.markdown
Last active April 7, 2017 13:56
Codepen React Boilerplate / WiP: ToDo List
@schafeld
schafeld / index.html
Created April 26, 2017 11:56
Social Media Icons, SVG
<div id="page-footer" class="flex-center">
<!-- Facebook Icon -->
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="11" height="24" viewBox="0 0 11 24" class="icon" id="icon-facebook">
<a xlink:href="http://www.facebook.com/Unitymedia" target="facebook">
<path fill-rule="evenodd" d="M2.378 4.648v3.304H0v4.04h2.378V24h4.884V11.993h3.277s.305-1.937.454-4.056H7.28V5.175c0-.413.533-.97 1.06-.97H11V0H7.382C2.257 0 2.378 4.044 2.378 4.648z"/>
</a>
</svg>
<!-- Google+ Icon -->
@schafeld
schafeld / index.html
Created May 8, 2017 07:26
Prototype Speedtest Dial (SVG)
<!-- SVG Speedclock. Begin. -->
<svg xmlns="http://www.w3.org/2000/svg" width="236" height="244" viewBox="0 0 236 244">
<defs>
<radialGradient id="a" cx="58.61%" r="31.426%" fx="58.61%" fy="50%">
<stop stop-color="#46CDEB" offset="0%"/>
<stop stop-color="#46CDEB" stop-opacity="0" offset="86.402%"/>
</radialGradient>
<radialGradient id="b" cx="58.61%" r="27.153%" fx="58.61%" fy="50%">
<stop stop-color="#A5D22D" offset="0%"/>
<stop stop-color="#A5D22D" stop-opacity="0" offset="100%"/>
@schafeld
schafeld / index.html
Created August 15, 2017 13:23
Speed Dials -- SVG pointer rotation controlled by CSS (4)
<svg xmlns="http://www.w3.org/2000/svg"
width="236"
height="244"
viewBox="0 0 236 244"
class="gauge first rotate-five-percent">
<g fill="none" fill-rule="evenodd">
<g fill-rule="nonzero">
<path fill="#FFF" d="M183.7 98.67c-.02-.11-.055-.217-.1-.32-.024-.048-.05-.095-.08-.14-3.18-7.603-7.767-14.538-13.52-20.44-.05-.13-.15-.235-.28-.29-12.24-12.43-28.956-19.427-46.4-19.42h-.64c-8.573.073-17.046 1.844-24.93 5.21l-.2.06c-.088.04-.17.085-.25.14-7.613 3.333-14.523 8.084-20.36 14-.134.056-.238.165-.29.3-5.66 5.782-10.2 12.563-13.39 20l-.05.09c-.05.102-.086.21-.11.32-3.322 7.968-5.022 16.518-5 25.15-.078 17.31 6.766 33.933 19.01 46.17.29.273.672.43 1.07.44.4-.003.78-.165 1.06-.45l9-9.15c.397-.378.556-.942.415-1.472-.14-.53-.56-.94-1.09-1.07-.533-.132-1.095.038-1.465.442l-7.88 8c-4.874-5.102-8.844-10.996-11.74-17.43l10.1-4.81c.748-.356 1.066-1.252.71-2-.356-.748-1.252-1.066-2-.71l-10 4.8c-2.668-6.787-4.12-13.99-4.29-21.28l11.31-.25c.828 0 1.5-.672 1.5-1.5s-.672-1.5-1.5-1.5l-11.31.25c
@schafeld
schafeld / index.html
Last active October 7, 2017 09:31
Snappy Slider
<div class="demo">
<p>
<label for="amount">Volume:</label>
<input type="text" id="amount" style="border:0; color:#f6931f; font-weight:bold;" />
</p>
<div id="slider-horizontal"></div>
</div>
@schafeld
schafeld / index.html
Created February 24, 2018 09:00
Typography Schafeld.com HP
<div class="container">
<div id="logo">
<svg id="Ebene_1" data-name="Ebene 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 294.78 105.6" copyright="Oliver Schafeld, info@schafeld.com">
<defs>
<style>
.cls-12{letter-spacing:0}
</style>
<linearGradient id="Unbenannter_Verlauf_8" data-name="Unbenannter Verlauf 8" x1="-1.63" y1="83.58" x2="35.13" y2="70.2" gradientUnits="userSpaceOnUse">
<stop offset=".16" stop-color="#b4e1fa"/>
<stop offset=".59" stop-color="#4ac0e5"/>