Skip to content

Instantly share code, notes, and snippets.

View brecke's full-sized avatar
🏠
Working from home

Miguel Laginha brecke

🏠
Working from home
View GitHub Profile
@softwarespot
softwarespot / .jsbeautifyrc
Last active January 8, 2023 10:42
JS Beautifier configuration
// Documentation: https://github.com/beautify-web/js-beautify
// Example URL: https://github.com/victorporof/Sublime-HTMLPrettify/blob/master/.jsbeautifyrc
// Based on Airbnb's JavaScript Style Guide, URL: https://github.com/airbnb/javascript
{
// Collapse curly brackets
"brace_style": "collapse",
// Break chained method calls across subsequent lines
"break_chained_methods": true,
@roachhd
roachhd / ACTUAL-PROJECTS.md
Last active August 31, 2017 04:05
BADGES ❤ BADGES ❤ BADGES

######notepad Codeship Status for roachhd/Notepad

<a href="http://validator.w3.org/feed/check.cgi?url=http%3A//katieball.me//games/feed.xml"><img src="valid-rss-rogers.png" alt="[Valid RSS]" title="Validate my RSS feed" />RSS feed validation for /Games</a>

######Katieball.me/games RSS feed validation results Feed validation

######Markdown gitbook build status Build Status

@jiaaro
jiaaro / installing_pyaudio.md
Last active January 21, 2023 18:40
How to install PyAudio into a VirtualEnv on Mac OS X 10.10

Install portaudio using homebrew (or method of your choice)

brew install portaudio

create $HOME/.pydistutils.cfg using the include and lib directories of your portaudio install:

[build_ext]
@myusuf3
myusuf3 / delete_git_submodule.md
Created November 3, 2014 17:36
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@nnarhinen
nnarhinen / README.md
Last active June 25, 2019 09:33
Rails-like console with express.js, bookshelf.js and node-repl-promised

Install node-repl-promised: npm install -g repl-promised

Use the repl to list all users

$ node-promised
> var app = require('./app');
undefined
> var Bookshelf = app.get('bookshelf');
undefined
#!/bin/sh
remove_dangling() {
echo "Removing dangling images ..."
docker rmi $(docker images -f dangling=true -q)
}
remove_stopped_containers() {
echo "Removing stopped containers ..."
docker rm $(docker ps -qa)
@dedy-purwanto
dedy-purwanto / gist:11312110
Created April 26, 2014 05:00
Bulk remove iTerm2 color schemes.
# There was a day where I have too many color schemes in iTerm2 and I want to remove them all.
# iTerm2 doesn't have "bulk remove" and it was literally painful to delete them one-by-one.
# iTerm2 save it's preference in ~/Library/Preferences/com.googlecode.iterm2.plist in a binary format
# What you need to do is basically copy that somewhere, convert to xml and remove color schemes in the xml files.
$ cd /tmp/
$ cp ~/Library/Preferences/com.googlecode.iterm2.plist .
$ plutil -convert xml1 com.googlecode.iterm2.plist
$ vi com.googlecode.iterm2.plist
@crohr
crohr / install-openproject-plugins.md
Last active June 8, 2018 07:03
Install openproject plugins using the debian package

Let's say you wanted to install this plugin: https://github.com/finnlabs/openproject-meeting. Here is how you would do it with the openproject version packaged at https://pkgr.io/apps/tessi/openproject:

cat >> /opt/openproject/Gemfile.plugins <<EOF
gem "openproject-plugins", :git => "https://github.com/opf/openproject-plugins.git", :branch => "stable"
gem "openproject-meeting", :git => "https://github.com/finnlabs/openproject-meeting.git", :branch => "stable"
EOF
@DanHerbert
DanHerbert / fix-homebrew-npm.md
Last active February 12, 2024 17:18
Instructions on how to fix npm if you've installed Node through Homebrew on Mac OS X or Linuxbrew

OBSOLETE

This entire guide is based on an old version of Homebrew/Node and no longer applies. It was only ever intended to fix a specific error message which has since been fixed. I've kept it here for historical purposes, but it should no longer be used. Homebrew maintainers have fixed things and the options mentioned don't exist and won't work.

I still believe it is better to manually install npm separately since having a generic package manager maintain another package manager is a bad idea, but the instructions below don't explain how to do that.

Fixing npm On Mac OS X for Homebrew Users

Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.

@terenceponce
terenceponce / README.md
Last active January 2, 2019 04:02
Setting up rbenv, Ruby 2.1, Rails 4.1.0.beta1, nginx, Passenger, PostgreSQL 9.1 on Ubuntu 12.04 LTS for Windows Azure

Setting up Ruby, Rails, Nginx, Passenger, PostgreSQL 9 on Ubuntu 12.04 LTS for Windows Azure

Last updated: 12/31/2013

Fix the locale issue

  • Edit /etc/default/locale as sudo.
  • Append LC_ALL="en_US.UTF-8" at the end of the file, save and quit.
  • sudo locale-gen en_US en_US.UTF-8
  • sudo dpkg-reconfigure locales

Install the necessary packages to install rbenv and build Ruby