Skip to content

Instantly share code, notes, and snippets.

View Patrick84's full-sized avatar

Patrick Lautsch Patrick84

  • Rheinschafe GmbH
  • Bottrop, Germany
View GitHub Profile
@Patrick84
Patrick84 / index.html
Created June 26, 2022 13:57
My Flexbox Cheatsheet
<p style="text-align: center">
<a href="https://css-tricks.com/snippets/css/a-guide-to-flexbox/" target="_blank">
A Complete Guide to Flexbox
</a>
</p>
<div class="example" id="example-1">
<h2>Example #1</h2>
<pre>
@Patrick84
Patrick84 / yt2mp3.txt
Created June 19, 2016 15:18
youtube-dl.exe
Windows: youtube-dl.exe --extract-audio --audio-format mp3 <video URL>
Unix: youtube-dl --extract-audio --audio-format mp3 <video URL>
@Patrick84
Patrick84 / timestamp_operation.sql
Created April 19, 2016 14:56
Example for an operation with 'CURRENT_TIMESTAMP'.
SELECT * FROM `reservierung` WHERE `countdown_start` < CURRENT_TIMESTAMP - INTERVAL 7 MINUTE
@Patrick84
Patrick84 / html5_placeholder.html
Last active January 18, 2016 16:19
Placeholder in Inputs (HTML5)
<input name="foobar" placeholder="Foobar eingeben" />
@Patrick84
Patrick84 / html5_progressbar.html
Created January 17, 2016 15:04
Progress Bar (HTML5)
<section>
<h2 ondblclick="updateProgress(66)">Task Progress</h2>
<p>Progress: <progress id="p" max=100><span>20</span>%</progress></p>
<script>
var progressBar = document.getElementById('p');
function updateProgress(newValue) {
progressBar.value = newValue;
progressBar.getElementsByTagName('span')[0].textContent = newValue;
}
</script>
@Patrick84
Patrick84 / dygrap_template.html
Last active August 29, 2015 14:19
Dygraph-Template incl. hosted-code include
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="utf-8">
<script src="http://cdnjs.cloudflare.com/ajax/libs/dygraph/1.1.0/dygraph-combined.js"></script>
<script>
</script>
<style>
@Patrick84
Patrick84 / simpleDataBindingExample.txt
Created March 21, 2015 19:47
Two Textboxes bound to each other in XAML. If the Text of the first Textbox is changed, the second one will also change.
<Window x:Class="BindingExample.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525">
<Grid>
<TextBox x:Name="tb1" HorizontalAlignment="Left" Height="23" Margin="102,80,0,0" TextWrapping="Wrap" Text="" VerticalAlignment="Top" Width="120"/>
<TextBox x:Name="tb2" HorizontalAlignment="Left" Height="23" Margin="282,80,0,0" TextWrapping="Wrap" Text="{Binding Text, ElementName=tb1, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Top" Width="120"/>
</Grid>
</Window>
@Patrick84
Patrick84 / delegate_examples.cs
Created December 23, 2014 10:48
Delegate-Examples => Methods: named + anonymous + lambda-expression
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SandboxConsole
{
@Patrick84
Patrick84 / get_set_example.cs
Created December 18, 2014 14:42
Get/Set-Example
using System;
/**
* C#-OOP Example
**/
namespace SandboxConsole
{
public class Hund
{
@Patrick84
Patrick84 / foreach_example.cs
Created December 15, 2014 16:03
foreach-Example
using System;
using System.IO;
class Program
{
static void Main(string[] args)
{
string[] planetExpressMitarbeiter = {
"Philip J Fry",
"Bender Bieger Rodriguez",