Skip to content

Instantly share code, notes, and snippets.

View dnery's full-sized avatar

Danilo Nery dnery

View GitHub Profile
@dnery
dnery / CreateNewFile.ahk
Created April 14, 2021 00:05
AutoHotkey script to create a new file in the current folder
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
GetActiveExplorerPath()
{
explorerHwnd := WinActive("ahk_class CabinetWClass")
if (explorerHwnd)
{
@dnery
dnery / _vimrc
Last active April 14, 2021 00:07
My Windows gVim config
syntax on
" Boilerplate setup {
source $VIMRUNTIME/vimrc_example.vim
if &diffopt !~# 'internal'
set diffexpr=MyDiff()
endif
function MyDiff()
@dnery
dnery / .gitconfig
Last active December 7, 2023 01:30
My git config file with cute handy aliases
[user]
email = EDIT
name = EDIT
[core]
editor = vim
[push]
default = simple
[alias]
co = checkout
st = status
@dnery
dnery / keybase.md
Created September 18, 2016 20:13
GitHub identity proof for keybase

Keybase proof

I hereby claim:

  • I am dnery on github.
  • I am dnery (https://keybase.io/dnery) on keybase.
  • I have a public key whose fingerprint is B1E6 6914 ECC4 DE96 E051 6BAA 9076 DDE2 0B0D B278

To claim this, I am signing this object:

@dnery
dnery / solution.erl
Last active March 25, 2019 12:54
dailyprogrammer #279 solution attempt in erlang
- module(solution).
- export([prettify/1,reflow/1,justify/1]).
% module entry point
%
prettify(A) -> lists:concat
(justify(reflow(re:split(A, "\\s+", [{return, list}])))).
% reflow calculator function
%
@dnery
dnery / solution.hs
Last active March 25, 2019 12:54
dailyprogrammer #279 solution attempt in haskell
import Data.List
import Data.List.Utils -- cabal install missingH
-- solution.hs
-- reflow and justify input text to 40-char width.
-- redir the output to a formatting function, so
-- results can actually be seen. e.g.:
-- putStrLn(prettify "sample text")
-- curryfying function
@dnery
dnery / BoucingBall.java
Created April 4, 2016 06:04
Simple bouncing ball scene using the Java based cg2014 framework
package br.usp.icmc.vicg.gl.app;
import com.jogamp.opengl.util.AnimatorBase;
import com.jogamp.opengl.util.FPSAnimator;
import javax.media.opengl.GLCapabilities;
import javax.media.opengl.GLProfile;
import javax.media.opengl.awt.GLCanvas;
import javax.swing.*;