Skip to content

Instantly share code, notes, and snippets.

View MoltenCoreDev's full-sized avatar

Michał Stachurski MoltenCoreDev

View GitHub Profile
@koonix
koonix / live-wallpaper.sh
Last active February 17, 2022 20:32
Set live wallpapers on linux.
#!/bin/sh
# soystemd 2021-04-10 (https://github.com/soystemd)
# sets a video or gif as your wallpaper.
# requires mpv, xwinwrap and xrandr.
# to kill the live wallpaper, just run this with no arguments.
#
# example:
# $ live video.mp4
#
# for killing:
@flaviocopes
flaviocopes / check-substring-starts-with.go
Last active June 23, 2024 09:05
Go: check if a string starts with a substring #golang
package main
import (
"strings"
)
func main() {
strings.HasPrefix("foobar", "foo") // true
}
@jurandysoares
jurandysoares / christmastree.py
Created December 26, 2012 15:04
A small Christmas' Tree Algorithm in Python.
import turtle
screen = turtle.Screen()
screen.setup(800,600)
circle = turtle.Turtle()
circle.shape('circle')
circle.color('red')
circle.speed('fastest')
circle.up()
@zippy1981
zippy1981 / DisplayImage.ps1
Created May 13, 2011 02:20
Display an image from Windows Powershell
# Loosely based on http://www.vistax64.com/powershell/202216-display-image-powershell.html
[void][reflection.assembly]::LoadWithPartialName("System.Windows.Forms")
$file = (get-item 'C:\Users\Public\Pictures\Sample Pictures\Chrysanthemum.jpg')
#$file = (get-item "c:\image.jpg")
$img = [System.Drawing.Image]::Fromfile($file);
# This tip from http://stackoverflow.com/questions/3358372/windows-forms-look-different-in-powershell-and-powershell-ise-why/3359274#3359274