Skip to content

Instantly share code, notes, and snippets.

@idbrii
idbrii / Easing.cs
Last active July 10, 2020 19:24 — forked from ThomasFOG/Easing.cs
C# implementation of Robert Penner's easing functions
// TERMS OF USE - EASING EQUATIONS
//
// Open source under the BSD License.
//
// Copyright © 2001 Robert Penner
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
//
// Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
@idbrii
idbrii / main.lua
Last active November 12, 2021 19:12
Love2d Physics Tutorial -- but with kinematic player body
-- Demonstration of love physics with a kinematic body
-- based on dynamic version: https://love2d.org/wiki/Tutorial:Physics
--
--
-- When an object is controlled by setting its position instead of applying
-- forces, it should be kinematic. But when it interacts with dynamic
-- bodies, sometimes they are sleeping and do not respond to collisions.
--
-- Possible solutions:
-- * set velocity instead of position
@idbrii
idbrii / gvim.bat
Created February 28, 2020 01:09
Example gvim.bat generated by vim's install.exe
@echo off
rem Created by idbrii based on script from vim 8.2.314
rem See also https://github.com/vim/vim/blob/1fa8d2c33d7290eda7dc2a94d4ec6a599a2d61dd/src/dosinst.c#L842-L950
rem -- Run Vim --
rem # uninstall key: vim82 #
setlocal
set VIM_EXE_DIR=C:\Users\idbrii\scoop\apps\vim-nightly\current
if exist "%VIM%\vim82\gvim.exe" set VIM_EXE_DIR=%VIM%\vim82
if exist "%VIMRUNTIME%\gvim.exe" set VIM_EXE_DIR=%VIMRUNTIME%
@idbrii
idbrii / airline.vprof
Last active January 27, 2020 21:43
profiling airline branch head
https://github.com/vim-airline/vim-airline/issues/2029
To get profile:
> gvim.exe ~/.vim/bundle/airline/autoload/airline/extensions/branch.vim
:profile start ~/airline.vprof | profile func * | Gedit HEAD
" wait for five seconds after buffer shows commit info
:quit
FUNCTION FugitiveExtractGitDir()
@idbrii
idbrii / aseprite-easy-build.bat
Last active January 14, 2024 17:54
A simple build script for building Aseprite on Windows 10
@echo off
SETLOCAL EnableDelayedExpansion
:: Derived from the steps in INSTALL.md (https://github.com/aseprite/aseprite/blob/fd2077ce7d80e6af3202958c52291e5d6fb7f556/INSTALL.md)
:: to figure out how to builds this. Worked to build aseprite 1.2.16 release
:: with skia m71 and the most recent (sorry) verison of depot tools.
:: https://github.com/aseprite/aseprite/releases/download/v1.2.16.2/Aseprite-v1.2.16.2-Source.zip
:: https://github.com/aseprite/skia/archive/aseprite-m71.zip
:: https://storage.googleapis.com/chrome-infra/depot_tools.zip
::
// test case for https://vi.stackexchange.com/questions/8718/vim-switch-statement-cindent-options/8722#8722
{
switch (status)
{
case Status.OK:
return ErrorCode.OK;
case Status.Bad:
{
@idbrii
idbrii / botw-cedec2017.md
Last active January 29, 2025 23:58
An inline image version of Matt Walker's translation of CEDEC 2017 talks by Nintendo
@idbrii
idbrii / gist:e00b2c62120bc002ec1d
Created March 14, 2015 14:08
BugMeNot Bookmarklet
// The bookmarklet you can find online for bugmenot doesn't work. Looks like
// bugmenot now wants just the hostname instead of the full url. Here's one
// that works.
javascript:(function() { var url = ('http://www.bugmenot.com/view/' + escape(location.hostname)); w = open(url, 'w', 'location=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=500,height=400,modal=yes,dependent=yes'); if (w) { setTimeout('w.focus()', 1000) } else { location = url } })();
@idbrii
idbrii / etc.screenrc
Created August 8, 2012 16:47
/etc/screenrc on Ubuntu 12.04
# $Id: screenrc,v 1.15 2003/10/08 11:39:03 zal Exp $
#
# /etc/screenrc
#
# This is the system wide screenrc.
#
# You can use this file to change the default behavior of screen system wide
# or copy it to ~/.screenrc and use it as a starting point for your own
# settings.
#
@idbrii
idbrii / gist:3069527
Created July 8, 2012 05:22 — forked from kien/gist:1610859
Custom statusline example
" File: after/plugin/ctrlp.vim
" Description: Custom statusline example
" Make sure ctrlp is installed and loaded
if !exists('g:loaded_ctrlp') || ( exists('g:loaded_ctrlp') && !g:loaded_ctrlp )
fini
en
" ctrlp only looks for this