Skip to content

Instantly share code, notes, and snippets.

View DavidLiedle's full-sized avatar
🐒
(code)

David Liedle DavidLiedle

🐒
(code)
View GitHub Profile
@huytd
huytd / wordle.md
Last active May 16, 2024 20:39
Wordle in less than 50 lines of Bash

image

How to use:

./wordle.sh

Or try the unlimit mode:

@slightfoot
slightfoot / timestamp_converter.dart
Created April 22, 2020 16:28
Timestamp/DateTime Converter for Cloud Firestore and Dart/Flutter.
// MIT License
//
// Copyright (c) 2020 Simon Lightfoot
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
@s4y
s4y / Whole Foods delivery watcher.scpt
Last active April 24, 2020 03:12
AppleScript which reloads a Whole Foods delivery confirmation page and displays a notification when time slots are available or it otherwise needs attention (e.g. because an item has become unavailable)
tell application "Safari"
repeat
repeat with theWindow in every window
repeat with theTab in every tab of theWindow
if name of theTab contains "Reserve a Time Slot" then
set checkoutWindow to theWindow
set checkoutTab to theTab
end if
end repeat
end repeat
@arfaram
arfaram / FileSystem_use.md
Last active February 19, 2018 13:47
Multisiteaccess settings for ezplatform V2 (with symfony3.4) using individuall repository, (sub)domains, storage and cache pool filesystem (not recommended adapter) or redis example

ezplatform.yml

ezpublish:
    repositories:
        default:
            storage: ~
            search:
                engine: '%search_engine%'
                connection: default
function logColor(color, args) {
console.log(`%c ${args.join(' ')}`, `color: ${color}`);
}
const log = {
aliceblue: (...args) => { logColor('aliceblue', args)},
antiquewhite: (...args) => { logColor('antiquewhite', args)},
aqua: (...args) => { logColor('aqua', args)},
aquamarine: (...args) => { logColor('aquamarine', args)},
azure: (...args) => { logColor('azure', args)},
@arfaram
arfaram / CreateContentType.yml
Last active October 26, 2021 17:00
This is an example on how you can create eZPlatform ContentType with all existing FieldTypes using the KaliopMigrationBundle. The second example is using the Public API to create the content. This example demonstarte how to set the different eZPlatform FieldTypes
-
type: content_type
mode: create
content_type_group: Content
identifier: ez_content_fieldtypes
name:
eng-GB: 'eZ Content FieldType'
description: { }
name_pattern: '<title>'
url_name_pattern: ''
@arfaram
arfaram / ezpublish_RichTextField_REST_API.sh
Last active July 17, 2017 15:25
RichText_REST_API_ezpublish
curl -i -X POST http://site.ezplatform.com/api/ezp/v2/content/objects --data @content.xml -H 'Content-Type:application/vnd.ez.api.ContentCreate+xml' -H 'Accept:application/xml' --user admin:publish
#REST API Tested with ezplatform 1.5 (using RichTextField )
@helderco
helderco / db-open
Created October 6, 2015 14:51
Script to open a mysql database in Sequel Pro from a service in docker-compose.
#!/bin/bash
set -e
show_help() {
cat << EOF
Usage: ${0##*/} [-u USER] [-p PASS] [-P PORT] [-H HOST] [DATABASE]
${0##*/} -h
Open a standard connection in Sequel PRO.