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
public class SecondOrderDynamics2D | |
{ | |
// Dynamic constants. | |
private float k1, k2, k3; | |
// Previous dst. | |
private float pDstX, pDstY; | |
// State variables. | |
private float posX, posY; | |
private float accX, accY; | |
private float velX, velY; |
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 | |
# Note that the shell option `nullglob` needs to be set. **It is not set by default.** | |
# It prevents an error in case the glob (or one of multiple globs) does not match any name. | |
shopt -s nullglob | |
PROJECT_DIR=$(realpath "$1") | |
if [ ! -d "$PROJECT_DIR" ]; then | |
echo "Project directory is not valid: $1" >&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
[Thumbnailer Entry] | |
TryExec=/usr/bin/convert | |
Exec=/usr/bin/convert -colorspace sRGB %i'[0]' -background transparent -flatten -filter Point -thumbnail %sx%s -gravity center -extent %sx%s png32:%o | |
MimeType=image/png;image/bmp;image/x-bmp;image/x-MS-bmp;image/gif;image/x-icon;image/x-ico;image/x-win-bitmap;image/vnd.microsoft.icon;application/ico;image/ico;image/icon;text/ico;application/x-navi-animation;image/jpeg;image/x-portable-anymap;image/x-portable-bitmap;image/x-portable-graymap;image/x-portable-pixmap;image/tiff;image/x-xpixmap;image/x-xbitmap;image/x-tga;image/x-icns;image/jp2;image/jpeg2000;image/jpx;image/x-quicktime;image/qtif;image/vnd.adobe.photoshop;image/x-photoshop;image/x-psd;application/psd;application/x-psd;image/webp; |
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
#!/usr/bin/sh | |
if [ $# -ge 2 -a $# -lt 4 ]; then | |
mkdir -p /tmp/Aseprite | |
filename="$(mktemp -d -p /tmp/Aseprite/).png" | |
if [ $# -eq 2 ]; then | |
aseprite -b --frame-range "0,0" $1 --trim --sheet $filename | |
elif [ $# -eq 3 ]; then | |
aseprite -b --frame-range "0,0" $1 --shrink-to "$3,$3" --trim --sheet $filename |
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 | |
ABS_FILEPATH=$(realpath "$1") | |
ABS_DIR=$(dirname "$ABS_FILEPATH") | |
FILENAME=$(basename -- "$1") | |
EXTENSION="${FILENAME##*.}" | |
FILENAME="${FILENAME%.*}" | |
# echo "Filename is $FILENAME and the EXTENSION is $EXTENSION. Dir is $ABS_DIR" |
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
bind status D !@?rm -r %(file) | |
bind status P !git push origin | |
bind status A !git add . | |
bind stage 1 stage-update-line | |
set blame-view = id:yes,color file-name:no author:abbreviated date:relative-compact line-number:yes,interval=1 text | |
set main-view = line-number:no,interval=5 id:no date:relative-compact author:abbreviated commit-title:yes,graph,refs,overflow=no | |
set tree-view = line-number:no,interval=5 mode author:abbreviated file-size date:relative-compact id:no file-name |
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
data:text/html,<script> | |
fetch('https://api.github.com/repos/crashinvaders/gdx-texture-packer-gui/releases').then(response => { | |
response.text().then(responseText => { | |
let parsedResponse = JSON.parse(responseText); | |
let content = parsedResponse[0].assets.map(asset => ({ | |
file: asset.name, | |
downloads: asset.download_count | |
})); | |
let htmlContent = JSON.stringify(content, null, 4); | |
alert(htmlContent); |
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
import com.badlogic.gdx.Gdx; | |
import com.badlogic.gdx.files.FileHandle; | |
import com.badlogic.gdx.graphics.*; | |
import com.badlogic.gdx.graphics.VertexAttributes.Usage; | |
import com.badlogic.gdx.graphics.glutils.FrameBuffer; | |
import com.badlogic.gdx.graphics.glutils.ShaderProgram; | |
import com.badlogic.gdx.utils.Disposable; | |
import com.badlogic.gdx.utils.GdxRuntimeException; | |
/** |
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
#target photoshop | |
app.bringToFront(); | |
// This script exports Adobe Photoshop layers as individual PNGs. It also | |
// writes a JSON file which can be imported into Spine where the images | |
// will be displayed in the same positions and draw order. | |
// Copyright (c) 2012-2017, Esoteric Software | |
// All rights reserved. | |
// Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: |
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
#target photoshop | |
app.bringToFront(); | |
// This script exports Adobe Photoshop layers as individual PNGs. It also | |
// writes a JSON file which can be imported into Spine where the images | |
// will be displayed in the same positions and draw order. | |
// Copyright (c) 2012-2017, Esoteric Software | |
// All rights reserved. | |
// Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: |
NewerOlder