This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
// REFERENCING https://code.visualstudio.com/api/references/theme-color | |
"name": "VS Code Theme Reference", | |
"date": "2024-08-20", | |
"colors": { | |
////////////////////////////////// | |
// Contrast colors // | |
////////////////////////////////// | |
"contrastActiveBorder": "#000000", | |
"contrastBorder": "#000000", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# WLAN POWER SAVE | |
# check network card name with ip addr | |
iw wlp3s0f0 set power_save off | |
# CASE INSENSITIVE TAB COMPLETION | |
if [ ! -a ~/.inputrc ]; then echo '$include /etc/inputrc' > ~/.inputrc; fi | |
echo 'set completion-ignore-case On' >> ~/.inputrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Asettaa Netlifyssa A-recordin koneen nykyisellä ulkoisella ip:llä. Dependency ainoastaan jq. | |
# Tarvitsee argumentteina access tokenin (https://app.netlify.com/applications), verkko-osoitteen, aliosoitteen ja vanhenemisajan minuutteina. | |
# esim: ./netlify-dynamicdns.sh $AccessToken $Domain $Subdomain $TTL | |
# | |
if [ "$#" -ne 4 ]; then | |
echo "Wrong number of parameters passed" | |
echo "Usage:" | |
echo "$0 <ACCESS_TOKEN> <DOMAIN> <SUBDOMAIN> <TTL>" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# This is a script to update a Netlify subdomain A record with the current external IP. | |
# The example below would update the local.example.com A record to the current external IP with a TTL of 5 minutes. | |
# Copied from https://blog.skylerlewis.io/2020/12/diy-dynamic-dns-using-netlify-api.html | |
# | |
# Usage: | |
# netlify-ddns.sh <ACCESS_TOKEN> <DOMAIN> <SUBDOMAIN> <TTL> | |
# | |
# Example: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const articleImages = [...document.querySelectorAll("main article img")]; | |
if (articleImages.length) { | |
articleImages.forEach((image) => { | |
// If an image has a title it means that the user added a caption | |
// so replace the image with a figure containing that image and a caption | |
if (image.hasAttribute("title")) { | |
const figure = document.createElement("figure"); | |
const figCaption = document.createElement("figcaption"); | |
figCaption.innerHTML = image.getAttribute("title"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using Jypeli; | |
using Jypeli.Assets; | |
using Jypeli.Controls; | |
using Jypeli.Widgets; | |
public class T6_hiiripallo : PhysicsGame | |
{ | |
public override void Begin() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using Jypeli; | |
using Jypeli.Assets; | |
using Jypeli.Controls; | |
using Jypeli.Widgets; | |
public class T4_5_LahinPallo : PhysicsGame | |
{ | |
public override void Begin() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
public class t3_4_miidi | |
{ | |
public static void Main() | |
{ | |
//double[] luvut = {-1, -2, -3, 2, 5, -10}; // keskiarvo == 0.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// | |
/// </summary> | |
double r = 10; | |
public override void Begin() | |
{ | |
Camera.ZoomToLevel(); | |
Level.Background.Color = Color.Black; | |
Lumipallo(0,0); | |
Lumipallo(-50, 200); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cpath () { | |
pwd > ~/.pathfile | |
echo 'path copied' | |
} | |
ppath () { | |
cd $(cat ~/.pathfile) | |
} | |
cfile () { |
NewerOlder