Skip to content

Instantly share code, notes, and snippets.

@aharpole
aharpole / filename_adding_extension.rb
Last active August 14, 2019 17:45
testing filename without extension
def language
:ruby
end
@dannote
dannote / final-cut-pro-trial-reset.swift
Last active July 21, 2024 22:00
Final Cut Pro X trial reset
#!/usr/bin/swift
import Foundation
let path = URL(fileURLWithPath: NSString(string: "~/Library/Application Support/.ffuserdata").expandingTildeInPath)
let data = try! NSData(contentsOf: path) as Data
let dictionary = try! NSKeyedUnarchiver.unarchiveTopLevelObjectWithData(data) as! NSDictionary
let mutableDictionary = dictionary.mutableCopy() as! NSMutableDictionary
for (key, value) in mutableDictionary {
@fernandoaleman
fernandoaleman / fix-libv8-mac.txt
Created May 5, 2016 15:14
Fixing libv8 and therubyracer on Mac
brew tap homebrew/versions
brew install v8-315
gem install libv8 -v '3.16.14.13' -- --with-system-v8
gem install therubyracer -- --with-v8-dir=/usr/local/opt/v8-315
bundle install
@evantoli
evantoli / GitConfigHttpProxy.md
Last active July 20, 2024 03:29
Configure Git to use a proxy

Configure Git to use a proxy

In Brief

You may need to configure a proxy server if you're having trouble cloning or fetching from a remote repository or getting an error like unable to access '...' Couldn't resolve host '...'.

Consider something like:

@marteinn
marteinn / MSButtonTextTopCell.h
Last active April 26, 2021 04:36
NSButton example: Vertical aligning text in a NSButton
//
// MSButtonTextTopCell.h
// <Project>
//
// Created by Martin Sandström on 2015-09-23.
// Copyright (c) 2015 Martin Sandström. All rights reserved.
//
#import <Cocoa/Cocoa.h>
@jendiamond
jendiamond / 1railsgirlsla_part1_tutorial.md
Last active January 10, 2022 05:43
Rails Girls LA Guide
@insidegui
insidegui / gist:4bc3818e99233f9bf756
Created August 2, 2014 17:00
QTX Window with FOTWindow
_window.titleBarDrawingBlock = ^(BOOL drawsAsMainWindow, NSRect drawingRect, NSBezierPath *clippingPath){
NSColor* fillColor = [NSColor colorWithCalibratedRed: 0.076 green: 0.073 blue: 0.076 alpha: 1];
NSColor* strokeColor = [NSColor colorWithCalibratedRed: 0.289 green: 0.289 blue: 0.289 alpha: 1];
NSColor* gradientColor = [NSColor colorWithCalibratedRed: 0.179 green: 0.179 blue: 0.179 alpha: 1];
NSColor* shadowColor2 = [NSColor colorWithCalibratedRed: 0.719 green: 0.714 blue: 0.719 alpha: 1];
NSGradient* gradient = [[NSGradient alloc] initWithColorsAndLocations:
strokeColor, 0.0,
gradientColor, 0.50,
fillColor, 0.51, nil];
web: node index.js
@8bitDesigner
8bitDesigner / .powrc
Last active December 28, 2015 22:09 — forked from nbibler/gist:5307941
Everything you need to use RVM _sanely_.
if [ -f ".rvmrc" ]; then
source ".rvmrc"
fi