Skip to content

Instantly share code, notes, and snippets.

View obahareth's full-sized avatar
🧉
In the Zone

Omar Bahareth obahareth

🧉
In the Zone
View GitHub Profile
@eliotsykes
eliotsykes / rails_new_help_output.md
Last active March 31, 2024 17:09
"rails new" options explained

Run rails new --help to view all of the options you can pass to rails new:

$ bin/rails new --help
Usage:
  rails new APP_PATH [options]

Options:
  -r, [--ruby=PATH]                                      # Path to the Ruby binary of your choice
                                                         # Default: /Users/eliot/.rbenv/versions/2.2.0/bin/ruby
@russianryebread
russianryebread / FSScrollController.cs
Last active June 25, 2023 04:27
Inertial Scrolling for Unity 3D
using UnityEngine;
using System.Collections;
using Holoville.HOTween;
namespace FS.Handlers
{
public class FSScrollController : MonoBehaviour {
public float contentOverflowY = 0f;
public float contentHeight = 0f;
@Geesu
Geesu / assets.rake
Created December 8, 2014 16:55
Disable asset precompilation on heroku
Rake::Task["assets:precompile"].clear
namespace :assets do
task 'precompile' do
puts "Not pre-compiling assets..."
end
end
/* Taken zigmob's (http://forums.macrumors.com/showthread.php?t=1742566) workaround a step further
And added some triggers to clean up these dodgy character combinations (ff, fi, fl).
Still crashes on initial message read but saves having to manually run the sql query eve time a message contains the character combinations */
-- Working well for me so far --
CREATE TRIGGER insert_Ff AFTER INSERT ON ZWAMESSAGE
BEGIN
UPDATE ZWAMESSAGE
SET ZTEXT = replace( ZTEXT, 'ff', 'f f')
WHERE ZWAMESSAGE.ZTEXT like '%ff%';
@pincheira
pincheira / homebrew.rb
Last active July 1, 2016 17:07
Working version of Homebrew for OS X 10.10

Working version of Homebrew for OS X 10.10

The only way to get working Homebrew on OS X 10.10 for now (10.10 beta was just released a couple of hours ago) is by using an special fork by @jacknagel available at https://github.com/jacknagel/homebrew/tree/rb2.

To install this working version of Homebrew just execute:

ruby -e "$(curl -fsSL https://gist.githubusercontent.com/jpincheira/bd3698fee46735fac252/raw/2c6a2f81927871c1a64e2dfbbc5eef451c71a9ac/homebrew.rb)"

@archon810
archon810 / BuildConfig.java
Last active September 28, 2022 15:17
Fake Virus Shield AV
package com.deviant.security.shield;
public final class BuildConfig {
public static final String BUILD_TYPE = "debug";
public static final boolean DEBUG;
public static final String FLAVOR = "";
public static final String PACKAGE_NAME = "com.deviant.security.shield";
public static final int VERSION_CODE = 4;
public static final String VERSION_NAME = "2.2";
@munificent
munificent / gist:9749671
Last active June 23, 2022 04:04
You appear to be creating a new IDE...
You appear to be advocating a new:
[ ] cloud-hosted [ ] locally installable [ ] web-based [ ] browser-based [ ] language-agnostic
[ ] language-specific IDE. Your IDE will not succeed. Here is why it will not succeed.
You appear to believe that:
[ ] Syntax highlighting is what makes programming difficult
[ ] Garbage collection is free
[ ] Computers have infinite memory
[ ] Nobody really needs:
@davidbanham
davidbanham / rack-angular-xsrf.rb
Last active December 1, 2016 14:34
Angular XSRF rack middleware
class TokenAdder
def initialize(app)
@app = app
end
def call(env)
status, headers, body = @app.call(env)
response = Rack::Response.new body, status, headers
[skin]
description=Ajnasz Blue Theme. Midnight Commander skin from Ajnasz.
[Lines]
horiz=─
vert=│
lefttop=┌
righttop=┐
leftbottom=└
rightbottom=┘
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active May 7, 2024 09:29
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k