Skip to content

Instantly share code, notes, and snippets.

/* Numerically solve for the time-dependent Schrodinger equation in 2D,
using the split operator method. To build and run, type:
rustc qm2d_split_op.rs
./qm2d_split_op
This will output a series of bmp images which show each frame of the
simulation.
References:
@davidteren
davidteren / nerd_fonts.md
Last active April 24, 2024 05:39
Install Nerd Fonts via Homebrew [updated & fixed]
@jhaddix
jhaddix / content_discovery_all.txt
Created May 26, 2018 11:51
a masterlist of content discovery URLs and files (used most commonly with gobuster)
This file has been truncated, but you can view the full file.
`
~/
~
ים
___
__
_
@ArmandoMartiny
ArmandoMartiny / vmwk17key.txt
Created April 24, 2024 05:38 — forked from PurpleVibe32/vmwk17key.txt
Free VMware Workstation Pro 17 full license keys
Install VMWare Workstation PRO 17 (Read it right. PRO!)
Also, these keys might also work with VMWare Fusion 13 PRO. Just tested it.
Sub to me on youtube pls - PurpleVibe32
if you want more keys - call my bot on telegram. @purector_bot (THE BOT WONT REPLY ANYMORE) - Or: https://cdn.discordapp.com/attachments/1040615179894935645/1074016373228978277/keys.zip - the password in the zip is 102me.
---
This gist can get off at any time.
PLEASE, DONT COPY THIS. IF YOU FORK IT, DONT EDIT IT.
*If you have a problem comment and people will try to help you!
*No virus
@csfrancis
csfrancis / gdb_ruby_backtrace.py
Last active April 24, 2024 05:37
Dump an MRI call stack from gdb
# Updated for Ruby 2.3
string_t = None
def get_rstring(addr):
s = addr.cast(string_t.pointer())
if s['basic']['flags'] & (1 << 13):
return s['as']['heap']['ptr'].string()
else:
return s['as']['ary'].string()
@sbyx
sbyx / low-battery-level-detection-notification-for-all-battery-sensors.yaml
Last active April 24, 2024 05:37
Home Assistant Blueprint: Low battery level detection & notification for all battery sensors
blueprint:
name: Low battery level detection & notification for all battery sensors
description: Regularly test all sensors with 'battery' device-class for crossing
a certain battery level threshold and if so execute an action.
domain: automation
input:
threshold:
name: Battery warning level threshold
description: Battery sensors below threshold are assumed to be low-battery (as
well as binary battery sensors with value 'on').
@sbyx
sbyx / wake-up-light-alarm-with-sunrise-effect.yaml
Last active April 24, 2024 05:37
Home Assistant Blueprint: Wake-up light alarm with sunrise effect
blueprint:
name: Wake-up light alarm with sunrise effect
description: 'A wake-up light alarm with a brightness and color temperature sunrise
effect. Note: Requires date_time_iso sensor in configuration, not manually executable!'
domain: automation
input:
light_entity:
name: Wake-up light entity
description: The light to control. Turning it off during the sunrise will keep
it off. Color temperature range is auto-detected.
@JunkFood02
JunkFood02 / Motion.kt
Last active April 24, 2024 05:36
A music player demo made with Jetpack Compose animation APIs, including shared element transition, list animations, animated content, etc.
package com.example.compose_debug
import androidx.compose.animation.EnterTransition
import androidx.compose.animation.ExitTransition
import androidx.compose.animation.core.CubicBezierEasing
import androidx.compose.animation.core.Easing
import androidx.compose.animation.core.FastOutLinearInEasing
import androidx.compose.animation.core.FastOutSlowInEasing
import androidx.compose.animation.core.LinearOutSlowInEasing
import androidx.compose.animation.core.PathEasing
@SahilMahadwar
SahilMahadwar / bing-wallpaper.sh
Last active April 24, 2024 05:34
You can use this script to automatically set Bing's image of the day as your wallpaper. It downloads the image and saves it to a chosen folder. It also keeps track of downloaded images using a JSON file, so it won't download the same one twice. Just set it to run on every login to keep your wallpaper fresh!
#!/bin/bash
# Fetch wallpaper from the API - https://github.com/TimothyYe/bing-wallpaper
api_url="https://bing.biturl.top/?resolution=3840&format=json&index=0&mkt=zh-CN"
response=$(curl -s "$api_url")
# Parse JSON response
start_date=$(echo "$response" | jq -r '.start_date')
end_date=$(echo "$response" | jq -r '.end_date')
image_url=$(echo "$response" | jq -r '.url')
@linearhw
linearhw / KingFisher.md
Last active April 24, 2024 05:29
KingFisher 의 기능 요약/정리

KingFisher

데이터 변환

  • Remote > Data & Image

    • URLSession delegate 의 receiveData 로부터 받은 data 를 모은 다음, UIImage(data: scale:) method 사용
  • Data > toDisk

    • data 의 header 를 읽어서 타입(PNG, JPG, GIF)을 판별
    • 위에서 만든 이미지를 다시 타입에 따라 데이터로 또 만들어 줌 (?)