Skip to content

Instantly share code, notes, and snippets.

View seutje's full-sized avatar

Steve De Jonghe seutje

View GitHub Profile
@seutje
seutje / AutoCarrot.lua
Created November 1, 2019 00:15
AutoCarrot Fixed
if not AutoCarrotDB then
AutoCarrotDB = { enabled = true, ridingGloves = true, mithrilSpurs = true }
end
local f = CreateFrame("Frame")
f:RegisterEvent('PLAYER_LOGIN')
f:RegisterEvent('BAG_UPDATE')
f:SetScript("OnUpdate", function()
if(not AutoCarrotDB.enabled) then return end
if(IsMounted()) then
@seutje
seutje / chicken-lentil-stew.txt
Last active January 22, 2018 17:18
Chicken/lentil stew
- Butter
- Flour
- Chicken breasts (or a whole chicken) or green lentils (soaked)
- Chicken stock
- Carrots
- Leek
- Celery
- Potatoes
- Cream
- Parsly
@seutje
seutje / cashew-mango-noodles.txt
Created January 22, 2018 17:04
chili cashew mango noodles
- Spring beans
- White cabbage
- Mango
- Unroasted cashews (or chicken)
- Stir fry noodles that don't need seperate boiling
- Fresh chili
- Red onion
- Fresh garlic
- Fresh ginger
- Soy sauce
@seutje
seutje / soulless-chocolates.txt
Last active September 30, 2022 13:01
Soulless chocolates
- 800g dark chocolate
- 200g coconut oil
- 400g fresh ginger
- 5-10g cinnamon
- 2-4g dried chili flakes
- good pinch of nutmeg
- 10g of vanilla sugar (optional)
Melt half the dark chocolate in a double boiler.
Grate the ginger and combine it with the coconut oil, the cinnamon, dried chili, nutmeg and optional sugar and heat it up.
@seutje
seutje / beats.js
Created November 22, 2016 22:46
beats
function Kick(context) {
this.context = context;
};
Kick.prototype.setup = function() {
this.osc = this.context.createOscillator();
this.gain = this.context.createGain();
this.osc.connect(this.gain);
this.gain.connect(this.context.destination)
};
@seutje
seutje / Bar.php
Created September 1, 2016 12:47
conditional extension
class Bar extends DsFieldBase {
public function __construct($foo) {
// do some other stuff...
}
}
@seutje
seutje / FieldCloneBase.php
Created August 31, 2016 13:51
Field clone example, doesn't work with actual DS fields that aren't on the entity.
<?php
/**
* @file
* DS field clone base.
*/
namespace Drupal\mymodule;
use Drupal\ds\Plugin\DsField\DsFieldBase;
@seutje
seutje / printmap.js
Created August 18, 2016 10:31
Resize map for print.
var map;
var printHandler = function(e) {
// Grab center before resize.
var center = map.getCenter();
// Tell the map it needs to resize.
window.google.maps.event.trigger(map, 'resize');
// Set the center back to what it was pre-resize.
map.setCenter(center);
};
@seutje
seutje / FieldClone.php
Last active August 31, 2016 10:16
Clone a field!
<?php
/**
* @file
* DS field clone.
*/
namespace Drupal\mymodule\Plugin\DsField;
use Drupal\ds\Plugin\DsField\DsFieldBase;
@seutje
seutje / wundetheme.theme.php
Created August 1, 2016 14:39
bloody icons
<?php
function wundertheme_page_attachments_alter(&$attachments) {
// Prep various shortcut icons.
$icons = [
'android' => [
'properties' => [
'rel' => 'icon',
'type' => 'image/png',
],