Skip to content

Instantly share code, notes, and snippets.

View oliveratgithub's full-sized avatar

Oliver oliveratgithub

View GitHub Profile
@oliveratgithub
oliveratgithub / made-with-love.html
Last active May 6, 2024 14:27
Various snippets to add "Made with love" to your website using HTML, CSS and JavaScript
<!-- Example #1 - no styling -->
Made with ❤ in Switzerland
Made with ♥ in Switzerland
Made with ♡ in Switzerland
Made with ❤️ in Switzerland
Made with ♥️ in Switzerland
<!-- Example #2 - inline-styled ❤ -->
Made with <span style="color: #e25555;">&#9829;</span> in Switzerland
Made with <span style="color: #e25555;">&hearts;</span> in Switzerland
@oliveratgithub
oliveratgithub / emojis.json
Last active April 26, 2024 22:35
Emoji-list with emojis, names, shortcodes, unicode and html entities [massive list]
{
"emojis": [
{"emoji": "👩‍👩‍👧‍👧", "name": "family: woman, woman, girl, girl", "shortname": ":woman_woman_girl_girl:", "unicode": "1F469 200D 1F469 200D 1F467 200D 1F467", "html": "&#128105;&zwj;&#128105;&zwj;&#128103;&zwj;&#128103;", "category": "People & Body (family)", "order": ""},
{"emoji": "👩‍👩‍👧‍👦", "name": "family: woman, woman, girl, boy", "shortname": ":woman_woman_girl_boy:", "unicode": "1F469 200D 1F469 200D 1F467 200D 1F466", "html": "&#128105;&zwj;&#128105;&zwj;&#128103;&zwj;&#128102;", "category": "People & Body (family)", "order": ""},
{"emoji": "👩‍👩‍👦‍👦", "name": "family: woman, woman, boy, boy", "shortname": ":woman_woman_boy_boy:", "unicode": "1F469 200D 1F469 200D 1F466 200D 1F466", "html": "&#128105;&zwj;&#128105;&zwj;&#128102;&zwj;&#128102;", "category": "People & Body (family)", "order": ""},
{"emoji": "👨‍👩‍👧‍👧", "name": "family: man, woman, girl, girl", "shortname": ":man_woman_girl_girl:", "unicode": "1F468 200D 1F469 200D 1F467 200D 1F467", "html": "&#128104;&zwj;&#128105;&z
@oliveratgithub
oliveratgithub / Batch File Rename.scpt
Last active March 2, 2024 17:05
Simple AppleScript to easily batch rename multiple files sequentially. GUI asks user to select files and input a name before renaming.
-- This code comes from https://gist.github.com/oliveratgithub/
-- Open in AppleScript Editor and save as Application
-- ------------------------------------------------------------
--this is required to break the filename into pieces (separate name and extension)
set text item delimiters to "."
tell application "Finder"
set all_files to every item of (choose file with prompt "Choose the Files you'd like to rename:" with multiple selections allowed) as list
display dialog "New file name:" default answer ""
set new_name to text returned of result
--now we start looping through all selected files. 'index' is our counter that we initially set to 1 and then count up with every file.
@oliveratgithub
oliveratgithub / unix-aws-ses-testmail.txt
Created December 13, 2019 15:37
SMTP test email using AWS Simple Email Service (SES) on UNIX openssl s_client or Windows PowerShell
# Source: https://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-email-smtp-client-command-line.html
# X-SES-CONFIGURATION-SET is optional
EHLO yourdomain.com
AUTH LOGIN
base64 encoded Smtp Username
base64 encoded Smtp Password
MAIL FROM: from@yourdomain.com
RCPT TO: email@anydomain.com
DATA
#X-SES-CONFIGURATION-SET: YourSESConfigSet
@oliveratgithub
oliveratgithub / index.html
Last active November 26, 2023 08:11
Simple, quick & standalone HTML5 responsive placeholder Website. Runs by simply copy-paste the whole code without any additional resource files. It's based on PureCSS.io with jQuery containing a fullstretch-background image plugin and a date-time countdown; kudos to unsplash.it for beautiful placeholder images.
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Dummy Page</title>
<meta name="description" content="Simple, quick, standalone responsive placeholder Website without any additional resources">
<meta name="author" content="https://gist.github.com/oliveratgithub">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://unpkg.com/purecss@1.0.0/build/pure-min.css" integrity="sha384-nn4HPE8lTHyVtfCBi5yW9d20FjT8BJwUXyWZT9InLYax14RDjBj46LmSztkmNP9w" crossorigin="anonymous">
<!--[if lt IE 9]>
@oliveratgithub
oliveratgithub / curl-crawler.sh
Last active November 23, 2023 01:49
Unix Shell-Script to crawl a list of website URLs using curl
#!/bin/sh
timezone="Europe/Zurich"
# List of valid timezones: wikipedia.org/wiki/List_of_tz_database_time_zones
script="${0##*/}"
rootdir=$(cd `dirname "${BASH_SOURCE[0]}"` && pwd)
logfile="$script.log"
log="$rootdir/$logfile"
now=$(TZ=":$timezone" date)
# Uncomment 'mailto=' (remove #) to enable emailing the log upon completion
#mailto="your@email.com"
@oliveratgithub
oliveratgithub / readme.md
Created January 4, 2019 08:44
Configure the PHP CLI in macOS to use MAMP PHP binaries

Pre-requisites

Find MAMP's installed PHP version(s) you want to use the PHP CLI for:

$ ls -l /Applications/MAMP/bin/php/

Configure PHP CLI in macOS to use MAMP's PHP

  1. First, open your local user's .bash_profile in edit mode, in order to add aliases for accessing the PHP CLI locally
$ pico ~/.bash_profile
@oliveratgithub
oliveratgithub / socialnetworkimagesizes.js
Last active May 9, 2023 07:11
Social media networks image sizes as JSON and JavaScript lists – Contains image sizes for all major social networks and messengers as of 2020 (Facebook, Twitter, Instagram, Tik Tok, Telegram, WhatsApp, and more)
let socialnetworkimagesizes = {
'facebook': {
'profile': {
'Profile picture': { 'w': 180, 'h': 180 }
,'Cover photo': { 'w': 820, 'h': 312 }
}
,'content': {
'Timeline image': { 'w': 1200, 'h': 630 }
,'Highlighted image': { 'w': 1200, 'h': 717 }
,'Link - rectangular': { 'w': 1200, 'h': 628 }
@oliveratgithub
oliveratgithub / curl_url_check.sh
Last active February 7, 2023 06:08
Simple one-liner curl command for macOS/Unix bash terminal to repeatedly check a specific url
# Remark: list of valid timezones: wikipedia.org/wiki/List_of_tz_database_time_zones
clear; while [ : ]; do curl -sSL -w '%{http_code} %{url_effective} ' "https://github.com" -o /dev/null; echo $(TZ=":Europe/Zurich" date); sleep 5; done
@oliveratgithub
oliveratgithub / botconfigs.py
Last active December 21, 2022 01:33
Bot script for Telegram Messenger to publish stock market price updates - Python 3.x compatible and can run as a nohup service
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# ~~~~~
# Telegram Bot API configs for stock_notifications.py
# ~~~~~
token=''
chat=''