Skip to content

Instantly share code, notes, and snippets.

View lislis's full-sized avatar
🍿
Derp

lislis lislis

🍿
Derp
View GitHub Profile
@lislis
lislis / functions.php
Created June 6, 2023 11:49
Add "Login with Steady" as link to WP menu
/**
* For when you want the Steady login button as a proper link in your Wordpress menu.
* Assumes that you have the Steady WP plugin installed https://wordpress.org/plugins/steady-wp/
*/
add_filter('wp_nav_menu_items', 'add_steady_login_menu_function', 10, 2);
function add_steady_login_menu_function( $nav, $args ) {
// replace 'menu-location' with the name of your menu location
// you can find all menu locations in the 'register_nav_menus' function in your functions.php
@lislis
lislis / README.md
Created February 23, 2022 15:21
Workadventure self host notes

This guide is based on https://wiki.techinc.nl/Work-Adventure/install

I recommend reading it first to know what I'm updating here.

It's mainly the docker-compose.yaml and .env files (as workadventure itself made some architectural changes since the writing of their guide (eg maps is now called icon etc)).

Basically follow the technic.nl guide but use these files instead!

Things form the technic.nl guide you definitely still need to do:

  • fill in your domain and contact email in both .env
@lislis
lislis / l-system-tree-threejs.js
Last active September 4, 2020 12:38
Natural Machines
const DEG_TO_RAD = Math.PI/180;
//THREE js variables
const scene = new THREE.Scene();
const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1500);
const renderer = new THREE.WebGLRenderer({antialias:true});
camera.translateY(200);
camera.lookAt(new THREE.Vector3(0,0,0));
const cachedMatrix4 = new THREE.Matrix4();
const cachedQuat = new THREE.Quaternion();
@lislis
lislis / abstract.md
Created July 20, 2020 15:10
CEST - Talk

From Nand to Dinner - A Midsummer Night's Talk

Summer vacation is the perfect time to travel, experience different places and learn about the world. With the current state of the world however, let's stay home. Let's still travel though, to the land of electronics, experience logic gates and learn about dinner.


Lisa is a freelance creative technologist focusing on how individuals and society interact with technology.

@lislis
lislis / passwords.md
Created March 19, 2020 13:31
General Security Tips

Passwords

What makes a stromg password?

Password length

These days a strong password should have at least 12 characters of length. The more the better, because if an attacker does not know anything about our password, they have to try every possible combination and the options increase exponentially!

Numbers, uppercase letters etc

While it's a good idea to increase the entropy in the characterset you're using for your password (like, how many options there are for a single character in the password if an attacker had to guess all possible combinations), it only makes sense if it's truely random. Humans are actually very bad at thinking of randomnes.

@lislis
lislis / rails_new.sh
Created March 17, 2020 20:03
rails new without things
rails new --skip-action-mailer --skip-action-mailbox --skip-action-text --skip-active-storage --skip-action-cable --skip-javascript --skip-turbolinks --skip-sprockets --skip-git --skip-keep --skip-listen some_name
@lislis
lislis / event.md
Last active October 5, 2021 11:52
Hugo ical template

title: "Event title" slug: event-title date: "2020-03-02T19:30:00+01:00" summary: "the standard says this should be less than 75 characters!" end: "2020-03-02T22:00:00+01:00" location: "Event location if known" organizer: name: "Your name" email: "your@email.com"

@lislis
lislis / scroll.js
Created January 16, 2019 17:45
Fixed nav fade out on scroll-down, fade in on scroll up, vanilla js
// based on the jquery version of https://medium.com/@mariusc23/hide-header-on-scroll-down-show-on-scroll-up-67bbaae9a78c
var didScroll;
var lastScrollTop = 0;
var delta = 8; // to prevent 'accidental' trigger
var navbarHeight = 85; // probably in css
var navbarElem = document.querySelector('.navbar');
window.addEventListener('scroll', function (ev) {
didScroll = true;
@lislis
lislis / .travis.yml
Created September 5, 2018 14:08
Headless Chrome Config on Travis with Rails and Capybara
# [...]
addons:
chrome: stable
@lislis
lislis / spezi.zsh-theme
Last active April 14, 2017 15:18
zsh theme
# ZSH Theme - Preview: http://gyazo.com/8becc8a7ed5ab54a0262a470555c3eed.png
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
local user='%{$fg[blue]%}%n%{$reset_color%}'
local host='@$fg[magenta]%}%m%{$reset_color%}:%{$reset_color%}'
local current_dir='%{$fg[yellow]%}%~%{$reset_color%}'
local git_branch='$(git_prompt_info)%{$reset_color%}'
PROMPT="╭─${user}${host}${current_dir} ${git_branch}