Skip to content

Instantly share code, notes, and snippets.

View dervondenbergen's full-sized avatar
🍕

Felix De Montis dervondenbergen

🍕
View GitHub Profile
@marco79cgn
marco79cgn / dm-toilet-paper.js
Last active February 29, 2024 17:35
iOS Widget, das die Anzahl an Klopapier Packungen in deiner nächsten dm Drogerie anzeigt (für die scriptable.app)
// dm Klopapier Widget
//
// Copyright (C) 2020 by marco79 <marco79cgn@gmail.com>
//
// Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted.
//
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
// IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE

gif-from-tweet

There are so many great GIFs out there and I want to have copies of them. Twitter makes that harder than it should be by converting them to MP4 and not providing access to the source material. To make it easier, I made a bash pipeline that takes a tweet URL and a filename, extracts the MP4 from that tweet and uses ffmpeg to convert back to GIF.

Dependencies

  • ffmpeg
    • macOS: brew install ffmpeg
    • Ubuntu/Debian: apt install ffmpeg
pragma solidity ^0.4.11;
// @calvin_claus' contract
// @neuling2k didn't do anything
contract CryptoLambo {
address public dev1;
address public dev2;
@shikendon
shikendon / uptimerobot_discord.js
Last active April 21, 2021 11:52
Uptime Robot Discord integrations
// Alert Contact Type: Web-Hooks
// URL to Notify: https://discordapp.com/api/webhooks/{WEB_HOOK_ID}/{TOKEN}?
// POST Value (JSON Format):
{
"content": "Monitor is *alertTypeFriendlyName*: *monitorFriendlyName* ( *monitorURL* )\n```*alertDetails*```"
}
@jondot
jondot / keybez.md
Created January 14, 2016 16:49
ios keyboard bezier
  onKeyboardWillHide(e) {
    Animated.timing(this.state.height, {
      toValue: this.listViewMaxHeight,
      duration: e.duration,
      easing: Easing.bezier(0.1, 0.76, 0.55, 0.9)
    }).start();
  },

 onKeyboardWillShow(e) {
@bastianallgeier
bastianallgeier / mywidget.php
Created March 9, 2015 10:54
Most basic widget setup for panel widgets. You would put those two files in /site/widgets/mywidget/
<?php
return array(
'title' => 'Widget Title',
'html' => function() {
// any data for the template
$data = array();
return tpl::load(__DIR__ . DS . 'template.php', $data);
}
);
@toddmotto
toddmotto / consoleLoge.js
Last active August 29, 2015 13:57
console.loge(), many log, much console
window.console.loge = function (msg) {
var gifs = ['wink','shake-space','peepers','prizza','hat','gradient','fat','rainbow','sunglasses','derp','shake'],
wow = ['', 'wow! ', 'amaze! ', 'dazzle! '],
adjs = ['so', 'such', 'many', 'much', 'very'],
randomizr = function (a) { return a[Math.floor(Math.random() * a.length)];},
message = '%c ' + randomizr(wow) + randomizr(adjs) + ' ' + typeof msg + ': ',
css = 'background: url(http://d1e3ezyatlol8u.cloudfront.net/img/212/doge-' + randomizr(gifs) + '-212.gif) no-repeat 0 0; background-size: 80px 80px; font-family: \'Comic Sans MS\', cursive; text-shadow: 0 1px 1px rgba(0,0,0,1); font-size: 14px; padding: 25px; line-height: 70px; color: #fff; font-weight: 100;';
console.log.apply(console, typeof msg === 'object' ? [message, css, msg] : [message += msg, css]);
};
@KevinGimbel
KevinGimbel / hosts
Created February 17, 2014 20:14
Basics of setting up a VirtualHost with Apache (locally)
# /etc/hosts
127.0.0.1 localhost
127.8.8.8 fuckyouverymu.ch
127.0.0.8 atariba.se
127.0.0.3 typo3.local
127.0.0.5 my-awesome-site.local
# In my browser I can now use http://fuckyouverymu.ch to see my localhost (because I have no site.conf for fuckyouverymu.ch at the moment :D)
@KevinGimbel
KevinGimbel / loop.html
Created January 3, 2014 21:35
Building a Portfolio Page with Jekyll and Posts. Not tested but should work.
<!-- the standard loop for all your posts -->
{% for post in site.posts %}
<!-- check if there is a portfolio thing set inside the Front Matter
Note: Do not set "portfolio: false" on normal posts - this is not needed
and could lead to problems
-->
{% if post.portfolio %}
<!-- do nothing here -->
{% endif %}
@martinwinter
martinwinter / Open Safari tabs in Google Chrome
Last active November 20, 2020 11:33
Opens all Safari windows and tabs in Google Chrome.
tell application "Safari"
repeat with theSafariWindow in windows
tell application "Google Chrome" to set theChromeWindow to make new window
repeat with theSafariTab in theSafariWindow's tabs
set theURL to URL of theSafariTab
tell application "Google Chrome"
set theChromeTab to make new tab at end of tabs of theChromeWindow
set URL of theChromeTab to theURL
end tell
end repeat