Skip to content

Instantly share code, notes, and snippets.

Avatar
🐐
I may be slow to respond.

Boris Buliga d12frosted

🐐
I may be slow to respond.
View GitHub Profile
View ObjectDictionary.cs
// Copyright (c) 2012 Calvin Rien
// http://the.darktable.com
//
// This software is provided 'as-is', without any express or implied warranty. In
// no event will the authors be held liable for any damages arising from the use
// of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including commercial applications, and to alter it and redistribute it freely,
// subject to the following restrictions:
View GIF-Screencast-OSX.md

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

View GIF-Screencast-OSX.md

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

View PeirceLEM.hs
-- Exercise: prove Peirce’s law <=> law of excluded middle in Haskell
{-# LANGUAGE Rank2Types #-}
import Data.Void
type Not a = a -> Void
type Peirce = forall a b. ((a -> b) -> a) -> a
type LEM = forall a. Either (Not a) a
View fish_prompt.fish
function __prompt_duration
if test $CMD_DURATION
if test $CMD_DURATION -ge 8000
set_color white
echo -esn ' ~> duration: '
set_color yellow
echo -es $CMD_DURATION ' ms'
set_color normal
if hash terminal-notifier ^ /dev/null
echo -es 'Finished in ' $CMD_DURATION ' ms' | terminal-notifier
View fish_file.fish
function f
set -l glob name "hello"
# for comment case
if something_true
do_the_thing
end
begin; do_not_ignore_inliners; end
begin; echo "1"; end; begin; echo "2"; end
View Log.cs
using UnityEngine;
namespace Assets.Phunk.Core
{
public static class Log
{
#region Error
public static void ErrorFormat(UnityEngine.Object context, string template, params object[] args)
{
var message = string.Format(template, args);
@d12frosted
d12frosted / EmacsKeyBinding.dict
Last active Aug 29, 2015 — forked from jwreagor/EmacsKeyBinding.dict
Global Emacs Key Bindings for OS X
View EmacsKeyBinding.dict
{
/* Keybindings for emacs emulation. Compiled by Jacob Rus.
*
* This is a pretty good set, especially considering that many emacs bindings
* such as C-o, C-a, C-e, C-k, C-y, C-v, C-f, C-b, C-p, C-n, C-t, and
* perhaps a few more, are already built into the system.
*
* BEWARE:
* This file uses the Option key as a meta key. This has the side-effect
* of overriding Mac OS keybindings for the option key, which generally
@d12frosted
d12frosted / projectile-replace-regexp.el
Created Feb 27, 2016
A version of projectile-replace function that works with regexps. Be careful when using it on huge projects.
View projectile-replace-regexp.el
(defun projectile-replace-regexp ()
"Replace a string in the project using `tags-query-replace'.
Less efficient than `projectile-replace' but at least allows
usage of regular expressions. See
https://github.com/bbatsov/projectile/issues/576 for more details
on `projectile-replace' issue with regexps."
(interactive "P")
(let* ((old-text (read-string
(projectile-prepend-project-name "Replace: ")
(projectile-symbol-or-selection-at-point)))
View keybase.md

Keybase proof

I hereby claim:

  • I am d12frosted on github.
  • I am d12frosted (https://keybase.io/d12frosted) on keybase.
  • I have a public key ASDWalCe2USqwkWak_d8e3TZ-jDp0M6w66lrUc4TQcLViQo

To claim this, I am signing this object: