Skip to content

Instantly share code, notes, and snippets.

View nrk's full-sized avatar
🤔
はい、猫のように見えます。

Daniele Alessandri nrk

🤔
はい、猫のように見えます。
View GitHub Profile
@nrk
nrk / instructions.md
Created February 17, 2019 16:04 — forked from douglasmiranda/instructions.md
Add email to Keybase.io PGP Key (Public Key)

Export your public key:

keybase pgp export > keybase-public.key

Export your private key:

keybase pgp export --secret > keybase-private.key
@nrk
nrk / keybase.md
Created February 17, 2019 16:04 — forked from webframp/keybase.md
Signing git commits on github using keybase.io gpg key

Probably one of the easiest things you'll ever do with gpg

Install Keybase: https://keybase.io/download and Ensure the keybase cli is in your PATH

First get the public key

keybase pgp export | gpg --import

Next get the private key

@nrk
nrk / Random bytes, ints, UUIDs in PHP.md
Created May 11, 2016 16:15 — forked from tom--/Random bytes, ints, UUIDs in PHP.md
PHP random bytes, integers and UUIDs

Random bytes, ints, UUIDs in PHP

Simple and safe random getters to copy-paste

string randomBytes( int $length )

int randomInt ( int $min , int $max )

string randomUuid ( void )
#
# Original version by Grant Parnell is offline (http://digitaldj.net/2011/07/21/trim-enabler-for-lion/)
# Update July 2014: no longer offline, see https://digitaldj.net/blog/2011/11/17/trim-enabler-for-os-x-lion-mountain-lion-mavericks/
#
# Looks for "Apple" string in HD kext, changes it to a wildcard match for anything
#
# Alternative to http://www.groths.org/trim-enabler-3-0-released/
# Method behind this madness described: http://forums.macrumors.com/showthread.php?t=1409151&page=4
# See discussion in comments here: https://www.macupdate.com/app/mac/39654/lion-tweaks
# And here: http://forums.macrumors.com/showthread.php?t=1410459
//
// File: fsevents_windows.go
// Date: October 29, 2013
// Author: Peter Krnjevic <pkrnjevic@gmail.com>, on the shoulders of many others
//
// This code sample is released into the Public Domain.
//
package fsevents
import (
@nrk
nrk / gemfile_changelog.rb
Created November 22, 2012 09:30 — forked from thbar/gemfile_changelog.rb
Get Changelogs for outdated gems in Gemfile
#!/usr/bin/env ruby
def changelog_for_gem(gem)
changelogs = `bundle exec gem contents #{gem}`.lines.grep(/history|changelog|news/i)
if changelogs.empty?
puts "No changelog found for gem #{gem}"
return nil
end
@nrk
nrk / gist:3417659
Created August 21, 2012 17:37 — forked from avalanche123/gist:981817
GitHub Emoji
:+1:
:-1:
:airplane:
:art:
:bear:
:beer:
:bike:
:bomb:
:book:
:bulb:
@nrk
nrk / hack.sh
Created March 31, 2012 19:47 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@nrk
nrk / gist:1305921
Created October 22, 2011 12:10 — forked from DoggettCK/gist:1305566
Code from "Enumerations and Strings - Stop the Madness!" (modified and added over time)
using System;
using System.Collections.Generic;
using System.Linq;
namespace Util
{
public static class Enums
{
#region Parse Methods
/// <summary>
@nrk
nrk / gist:1265565
Created October 5, 2011 20:19 — forked from mazur/gist:1003052
Build IronRuby on mono OSX/Ubuntu
#!/bin/bash
shopt -s extglob #Enables extglob
# OS: OSX 10.6.7 and Ubuntu 11.04
# Mono: 2.10.1
# Mono 2.10 is required since we need C# 4.0 support to compile IronRuby.
# C# 4.0 support can either be found in mono 2.10 or 2.6 compiled with special
# flags.