Skip to content

Instantly share code, notes, and snippets.

View s-estay's full-sized avatar

Sebastian Estay s-estay

  • Knowit
  • Sweden
  • 21:41 (UTC +01:00)
View GitHub Profile
[
// open terminal with cmd-t
{
"context": "Workspace",
"bindings": {
"cmd-t": "terminal_panel::ToggleFocus"
}
},
// close terminal with cmd-t
{
@s-estay
s-estay / karabiner-swedish-letters.json
Created September 22, 2025 10:10
karabiner-swedish-letters
{
"description": "Map swedish äåö to Right Option + qao",
"manipulators": [
{
"from": {
"key_code": "q",
"modifiers": { "mandatory": ["right_option"] }
},
"to": [
{
@s-estay
s-estay / karabiner.json
Created December 18, 2024 22:22
HHKB MacOS SWE Kabiner-Elements config file
"profiles": [
{
"complex_modifications": {
"rules": [
{
"description": "Navigate using Left Control + hjkl",
"manipulators": [
{
"from": {
"key_code": "h",
@s-estay
s-estay / instance-mode-example.js
Last active September 5, 2019 14:29
P5js instance mode example
var sketch = function(p){
p.setup = function(){
p.createCanvas(p.windowWidth*0.8, 100);
}
p.draw = function(){
p.background(0);
}
@s-estay
s-estay / instance-mode-example.html
Last active September 4, 2019 19:04
Include new p5 objects within div tag in md-file
<script src = "{{site.baseurl}}/assets/js/instance-mode-example-one.js"></script>
<script src = "{{site.baseurl}}/assets/js/instance-mode-example-two.js"></script>
<script src = "https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.9.0/p5.min.js"></script>
<div class = "p5js-script-div" id = "script-1"></div>
<div class = "p5js-script-div" id = "script-2"></div>
@s-estay
s-estay / map-random.js
Last active September 4, 2019 19:01
P5js map random example
//instance mode
//map and random functions
var sketch = function(p){
var bcol = 0;
//objects
//in c++ this would be a struct
var spot = {
x : 100,
@s-estay
s-estay / classes-p5.js
Created August 23, 2018 10:14
Trying out classes in P5js
let bubble1, bubble2; //global variables
function setup(){
createCanvas(640, 200);
bubble1 = new Bubble(320, 50, 20, 'red', 2); //start at the center of the canvas
bubble2 = new Bubble(160, 50, 10, 'blue', 1); //new bubble2 to the left of bubble1
//print(bubble.x, bubble.y);
}
function draw(){
@s-estay
s-estay / this-is-a-test-im-1.js
Last active March 20, 2018 10:20
Create script using instance mode.
//instance mode
//template for creating a p5 sketch (kind of)
var sketch = function(p){
//RGB rainbow colors
p.rainbowR = [248, 255, 255, 254, 208, 105, 18, 68, 59];
p.rainbowG = [12, 51, 102, 174, 195, 208, 189, 68, 12];
p.rainbowB = [18, 17, 68, 45, 16, 37, 185, 221, 189];
var i;
@s-estay
s-estay / this-is-a-test.js
Created March 20, 2018 06:55
Contain script within div tag using p5 parent element.
//RGB rainbow colors
var rainbowR = [248, 255, 255, 254, 208, 105, 18, 68, 59];
var rainbowG = [12, 51, 102, 174, 195, 208, 189, 68, 12];
var rainbowB = [18, 17, 68, 45, 16, 37, 185, 221, 189];
var i;
var canvas;
var t = rainbowR.length;
function setup() {
@s-estay
s-estay / script.js
Last active March 20, 2018 06:56
How to add js to md.
<script src = "https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.6.0/p5.min.js"></script>
<script src = "https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.6.0/addons/p5.dom.min.js"></script>
<div id = "script-holder">
<script src = "{{site.baseurl}}/js/this-is-a-test.js"></script>
</div>