Skip to content

Instantly share code, notes, and snippets.

View gf3's full-sized avatar
🍊
workin' goodly

Gianni Chiappetta gf3

🍊
workin' goodly
View GitHub Profile
@rougier
rougier / nano-font-stack.org
Created February 1, 2022 16:49
NΛNO Emacs font stack

NΛNO Emacs font stack

  • Default font: Roboto Mono , 14pt, Light
  • Italic font: Victor Mono , 14pt, Semilight
  • Bold font: Roboto Mono , 14pt, Regular
  • Unicode font: Inconsolata , 16pt, Light
  • Icon font: Roboto Mono Nerd , 12pt, Light

Text excerpt using a gorgeous and true italic font (Victor Mono), chosen to really stand out from the default font (Roboto Mono).

@cblunt
cblunt / Gemfile
Created October 21, 2011 08:55
Configure Carrierwave for Amazon S3 Storage and Heroku
# ...
gem 'carrierwave'
gem 'fog', '~> 1.0.0' # Need to specify version, as carrierwave references older (0.9.0) which doesn't allow configuration of Rackspace UK Auth URL
@higepon
higepon / API.swift
Last active July 31, 2023 16:00
An example of JSON API call in Swift
//
// API.swift
//
// Created by Taro Minowa on 6/10/14.
// Copyright (c) 2014 Higepon Taro Minowa. All rights reserved.
//
import Foundation
typealias JSONDictionary = Dictionary<String, AnyObject>
@johnbeynon
johnbeynon / add_domain.rb
Last active June 13, 2023 15:37
Add custom domain to Render preview environment app
#!/usr/bin/ruby
# Script to add a custom domain to a preview environment web service. Use it via the buildCommand
#
# Resultant custom domain added to the service will be:
# <servicename>-pr-<number>.prs.mydomain.com
#
# Setup:
#
# Add a wildcard DNS entry to your domain, something like *.prs.mydomain.com pointing to 216.57.24.1
@lenary
lenary / gitconfig.ini
Created February 18, 2011 01:21
a special excerpt of my gitconfig
$ git clone github:lenary/guides.git
Cloning into guides...
remote: Counting objects: 255, done.
remote: Compressing objects: 100% (216/216), done.
remote: Total 255 (delta 111), reused 163 (delta 35)
Receiving objects: 100% (255/255), 1.49 MiB | 564 KiB/s, done.
Resolving deltas: 100% (111/111), done.
$ cd guides
$ git remote -v
@raphaelhanneken
raphaelhanneken / DragAndDropImageView.swift
Last active February 15, 2023 13:29
NSImageView with drag and drop capabilities written in Swift.
//
// DragAndDropImageView.swift
// Iconizer
// https://github.com/raphaelhanneken/iconizer
//
import Cocoa
class DragDropImageView: NSImageView, NSDraggingSource {
/// Holds the last mouse down event, to track the drag distance.
@Someguy123
Someguy123 / irc_key_gen.md
Created May 19, 2021 23:11
How to generate an ECDSA NIST256P key / certificate for use on IRC (SASL ECDSA-NIST256p-CHALLENGE) - macOS instructions using openssl, Libera (Freenode), and Textual IRC Client

1. Generating keys

1.1. Generate ECDSA key

Generate private key:

openssl ecparam -name prime256v1 -genkey -out irc_nist256.pem
@Kentzo
Kentzo / gist:1515314
Created December 23, 2011 20:44
How to create Floppy Disk Image on Mac OS X for MS-DOS in vmware fusion
1. In terminal use "dd if=/dev/zero of=myfloppy.img bs=1024 count=1440" to create file with appropriate size
2. Attach a floppy device in VM setting. Select myfloppy.img
3. Use the "format a:" command to format disk
@mattwynne
mattwynne / gist:1228927
Created September 20, 2011 11:52
eventually helper method for making assertions against asynchronous systems
# usage:
# it "should return a result of 5" do
# eventually { long_running_thing.result.should eq(5) }
# end
module AsyncHelper
def eventually(:options = {})
timeout = options[:timeout] || 2
interval = options[:interval] || 0.1
time_limit = Time.now + timeout
loop do
@danking
danking / gist:1068185
Created July 6, 2011 19:55
A very simple example showing how to use Racket's lexing and parsing utilities
#lang racket
(require parser-tools/lex
(prefix-in re- parser-tools/lex-sre)
parser-tools/yacc)
(provide (all-defined-out))
(define-tokens a (NUM VAR))
(define-empty-tokens b (+ - EOF LET IN))
(define-lex-trans number
(syntax-rules ()