Skip to content

Instantly share code, notes, and snippets.

View jaksonmoura's full-sized avatar
🎯
Focusing

Jakson Moura jaksonmoura

🎯
Focusing
  • Brazil
View GitHub Profile
@7pxvr
7pxvr / gist:3921e097d0f8fb36f34a3d90a61d5e84
Last active July 13, 2026 10:03
Run 8BitDo Ultimate Software V2 under Linux
In this guide i will teach you how to run 8BitDo Ultimate software v2 under Linux
Some people tried running it under clear wine and failed, i found out the issue, you need ttf-ms-win10 package
https://github.com/streetsamurai00mi/ttf-ms-win10 All you have to do is follow installation guide on this repo
After you successfully launched your software, you have to map udev rules
@JamesMGreene
JamesMGreene / gitflow-breakdown.md
Last active July 25, 2026 23:06
`git flow` vs. `git`: A comparison of using `git flow` commands versus raw `git` commands.

Initialize

gitflow git
git flow init git init
  git commit --allow-empty -m "Initial commit"
  git checkout -b develop master

Connect to the remote repository

@eibrahim
eibrahim / MyEmberJsonMediaTypeFormatter.cs
Last active December 10, 2016 15:04
A JSON formatter for ASP.NET Web API to support Ember Data
public class MyEmberJsonMediaTypeFormatter : JsonMediaTypeFormatter
{
private int _maxDepth = 256;
private JsonSerializerSettings _jsonSerializerSettings;
public MyEmberJsonMediaTypeFormatter()
{
_jsonSerializerSettings = CreateDefaultSerializerSettings();
}
public override System.Threading.Tasks.Task WriteToStreamAsync(System.Type type, object value, System.IO.Stream writeStream, System.Net.Http.HttpContent content, System.Net.TransportContext transportContext)
{
@artero
artero / launch_sublime_from_terminal.markdown
Last active March 10, 2026 11:29 — forked from olivierlacan/launch_sublime_from_terminal.markdown
Launch Sublime Text 2 from the Mac OS X Terminal

Launch Sublime Text 2 from the Mac OS X Terminal

Sublime Text 2 ships with a CLI called subl (why not "sublime", go figure). This utility is hidden in the following folder (assuming you installed Sublime in /Applications like normal folk. If this following line opens Sublime Text for you, then bingo, you're ready.

open /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl

You can find more (official) details about subl here: http://www.sublimetext.com/docs/2/osx_command_line.html

Installation

@jondahl
jondahl / has_many :dependent => :restrict
Created August 18, 2009 23:56
9 lines of code to add a :dependent => :restrict option to has_many (equivalent of "ON DELETE restrict")
when :restrict
method_name = "has_many_dependent_restrict_for_#{reflection.name}".to_sym
define_method(method_name) do
unless send(reflection.name).empty?
# change to named error...
raise ActiveRecord::StatementInvalid, "can't delete record because of dependent #{reflection.name}"
end
end
before_destroy method_name