Skip to content

Instantly share code, notes, and snippets.

View jonathanMelly's full-sized avatar
🧘‍♂️
Enjoying the flowing process of life

Jonathan Melly jonathanMelly

🧘‍♂️
Enjoying the flowing process of life
  • etml
  • switzerland
  • 17:45 (UTC +01:00)
View GitHub Profile
namespace WeatherTwentyOne;
courtesy of : https://github.com/davidortinau/WeatherTwentyOne/blob/main/src/WeatherTwentyOne/Services/ServiceExtensions.cs
public static class ServiceProvider
{
public static TService GetService<TService>()
=> Current.GetService<TService>();
public static IServiceProvider Current
=>
@jonathanMelly
jonathanMelly / upload.php
Created November 19, 2021 13:14
ckeditor image upload php backend
<?php
//ck editor config
//config.extraPlugins = 'uploadimage';
//config.imageUploadUrl='/upload/upload.php';
$maxSizeInMo=50;
$csrfName = "ckCsrfToken";
$token = $_POST[$csrfName];
$uploadKey = "upload";
@jonathanMelly
jonathanMelly / vid-to-gif.sh
Last active October 30, 2021 18:15 — forked from anonymous/vid-to-gif.sh
video 2 gif converter
#!/bin/bash
# rev4 - changes suggested by KownBash https://www.reddit.com/r/bash/comments/5cxfqw/i_wrote_a_simple_video_to_gif_bash_script_thought/da19gjz/
# Usage function, displays valid arguments
usage() { echo "Usage: $0 [-f <fps, defaults to 15>] [-w <width, defaults to 480] inputfile" 1>&2; exit 1; }
# set input variable to the first option after the arguments
input="${1}"
@jonathanMelly
jonathanMelly / github-azure-love.user.js
Last active April 7, 2020 15:23 — forked from knl/github-jira-love.js
Greasemonkey user script to link back to Azure devops from GitHub (forked from http://github.com/knl)
// ==UserScript==
// @name GitHub/Azure devops Links
// @namespace http://github.com/jonathanMelly
// @author jmy
// @version 1.0
// @description Link to azure devops work items from Github
// @match https://github.com/**
// @run-at document-end
// @noframes
// @grant none
@jonathanMelly
jonathanMelly / monodevelop-build-manjora-xfce.sh
Created March 19, 2020 16:12
Help to build monodevelop on manjora linux xfce version 19.04
#1 Install DEPS
#One meta package
pacman -S base-devel
#Then install the following
mono
mono-msbuild
mono-tools
libglade
cmake
referenceassemblies-pcl
param([string]$room,[string]$exec)
for ($i =1;$i -ile 5; $i++) {
$target = $("INF-"+$room+"-M5" + "{0:00}" -f $i)
#ping -n 1 -w 5 $target > $null;
#$status = "NETWORK DOWN"
#if ($lastexitcode -eq 0){
# $status ="NETWORK OK"}
#echo $($target + " -> " + $status)
@jonathanMelly
jonathanMelly / git-ftp-nested-modules.sh
Created August 16, 2018 09:08
Git ftp with sub-sub modules (example : moodle + hvp (incl. hvp submodules) deployment (recursive)
#You need to add a .git-ftp-ignore file with nested modules
#Example:
#moodle/mod/hvp/.git-ftp-ignore:
# editor
# library
# reporting
FTP_USER=john
FTP_PASSWORD=doe
FTP_HOST=tatooine.com
FTP_PATH=var/www