Skip to content

Instantly share code, notes, and snippets.

extends TouchScreenButton
@onready var indicator: Sprite2D = $Indicator
@onready var stick_center: Vector2 = texture_normal.get_size() / 2
@onready var max_distance: float = texture_normal.get_size().x / 2
@export_range(0.0, 0.5, 0.01) var deadzone := 0.1
@export_range(0.1, 10.0) var smoothing := 2.0
@export var x_axis: JoyAxis = JOY_AXIS_LEFT_X
@deevus
deevus / gh-dl-release
Last active June 2, 2024 20:22 — forked from maxim/gh-dl-release
Download assets from private Github releases
#!/usr/bin/env bash
#
# gh-dl-release! It works!
#
# This script downloads an asset from latest or specific Github release of a
# private repo. Feel free to extract more of the variables into command line
# parameters.
#
# PREREQUISITES
#

Keybase proof

I hereby claim:

  • I am deevus on github.
  • I am deevus (https://keybase.io/deevus) on keybase.
  • I have a public key ASBC0wH04xNlx0rCaRu_zK0Gch6QzYcxf0o6tGi2i3c-jgo

To claim this, I am signing this object:

@deevus
deevus / telegram.ps1
Last active December 17, 2017 01:51
$path = split-path $(resolve-path $(scoop which telegram))
push-location $path
./Telegram.exe
pop-location
@deevus
deevus / build.ps1
Created April 21, 2015 07:22
Cross Compile GNU Hello using Docker
$pkg = "hello-2.10"
$file = "$pkg.tar.gz"
# get dockerfile
invoke-webrequest "https://raw.githubusercontent.com/deevus/docker-mxe/develop/Dockerfile" -outfile "Dockerfile"
# get package
if(!(test-path $file)) {
invoke-webrequest "http://gnu.mirror.uber.com.au/hello/$file" -outfile $file
}
@deevus
deevus / scoop-plist.ps1
Created April 5, 2015 04:24
Posh version of scoop-list
# Usage: scoop plist <query>
# Summary: A posh version of scoop list
# Help: Lists the apps installed in scoop
param($query)
$(scoop shellinit)
. "$env:SCOOP_HOME/lib/core.ps1"
. "$env:SCOOP_HOME/lib/manifest.ps1"
. "$env:SCOOP_HOME/lib/versions.ps1"
#requires -v 3
# remote install:
# iex (new-object net.webclient).downloadstring('https://get.scoop.sh')
$erroractionpreference='stop' # quit if anything goes wrong
$branch = "scoop-update-git"
# get core functions
$core_url = "https://raw.githubusercontent.com/deevus/scoop/$branch/lib/core.ps1"
@deevus
deevus / README.md
Last active August 29, 2015 14:18
Powershell Script for Bootstrapping Scoop (Powershell 2 will be upgraded to 4.0)

Scoop Bootstrap Script

Use this script to bootstrap an install of Scoop regardless of your version of Powershell

To use run this from Powershell:

iex (new-object net.webclient).downloadstring('http://bit.ly/1ECcuEn')
$cmd = "java -jar $(Resolve-Path $env:SCOOP)\apps\pixel-dungeon\1.7.2a-1\desktop-1.7.2a-1.jar"
start-job -scriptblock { iex $cmd }
int
load_data(FILE *fp, t_data *ptr_data) {
//read into array
fread(&ptr_data->n, BINARY_N_LENGTH, 1, fp);
//get n
int n = extract_little((char *)&ptr_data->n, 0, BINARY_N_LENGTH);
//allocate array
ptr_data->array = malloc(sizeof(t_double) * n);