Skip to content

Instantly share code, notes, and snippets.

Avatar

Posăceanu Marian marianposaceanu

View GitHub Profile
@marianposaceanu
marianposaceanu / disable.sh
Created Dec 31, 2019 — forked from pwnsdx/disable.sh
Disable bunch of #$!@ in Catalina
View disable.sh
#!/bin/bash
# IMPORTANT: Don't forget to logout from your Apple ID in the settings before running it!
# IMPORTANT: You will need to run this script from Recovery. In fact, macOS Catalina brings read-only filesystem which prevent this script from working from the main OS.
# This script needs to be run from the volume you wish to use.
# E.g. run it like this: cd /Volumes/Macintosh\ HD && sh /Volumes/Macintosh\ HD/Users/sabri/Desktop/disable.sh
# WARNING: It might disable things that you may not like. Please double check the services in the TODISABLE vars.
# Get active services: launchctl list | grep -v "\-\t0"
# Find a service: grep -lR [service] /System/Library/Launch* /Library/Launch* ~/Library/LaunchAgents
View keybase.md

Keybase proof

I hereby claim:

  • I am marianposaceanu on github.
  • I am dakull (https://keybase.io/dakull) on keybase.
  • I have a public key ASAh1wAzfMC9-2TW-ZwfKJU7fwtpkS-Yh17tNzAjpAWtHgo

To claim this, I am signing this object:

View measure_features_run_time.rb
require 'benchmark'
timings = {}
measure_feature = -> feature_path {
time = Benchmark.measure {
puts "Benchmarking feature #{feature_path}."
cmd = `cucumber --format json -r features '#{feature_path}'`
}
View capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
@marianposaceanu
marianposaceanu / octopus.rest.md
Last active Jun 10, 2016
octopus.rest - state of the art REST client
@marianposaceanu
marianposaceanu / mkvit.rb
Last active May 19, 2016
Convert videos to H.264 mkv easily (using ffmpeg)
View mkvit.rb
# _ _ _
# | | (_)| |
# _ __ ___ | | ____ __ ______ _ | |_
# | '_ ` _ \ | |/ /\ \ / /|______|| || __|
# | | | | | || < \ V / | || |_
# |_| |_| |_||_|\_\ \_/ |_| \__|
#
# Simple script to convert your old video files to H.264 mantaining their quality
#
# Usage:
@marianposaceanu
marianposaceanu / branching.md
Last active Apr 14, 2016
Git: naming branches
View branching.md

Examples

I'm working on a feature in ticket 59:

git co -b feature/59/add-filtering

I'm working on a bug:

git co -b bug/101/template-error

View neat_ruby_debug.rb
# The classics
class Foo
def bar; end
def self.baz; end
end
Foo.instance_method(:bar).source_location
Foo.method(:baz).source_location
# A tad more
@marianposaceanu
marianposaceanu / ElCapitan.applescript
Created Feb 17, 2016 — forked from nrollr/ElCapitan.applescript
Performance improvements for El Capitan
View ElCapitan.applescript
-- Disable Time Machine Local Backups
sudo tmutil disablelocal
-- Disable Automatic Spell Checker
defaults write -g NSAutomaticSpellingCorrectionEnabled -bool false
-- Disable animations when opening and closing windows.
defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool false
-- Disable animations when opening a Quick Look window.
defaults write -g QLPanelAnimationDuration -float 0
-- Accelerated playback when adjusting the window size (Cocoa applications).
defaults write NSGlobalDomain NSWindowResizeTime -float 0.001
You can’t perform that action at this time.