Skip to content

Instantly share code, notes, and snippets.

rom3r4 /
Created August 4, 2023 22:00 — forked from cdesch/
Rails Generator CheatSheet

Cheat Sheets are greate but they are not a substitute for learning the framework and reading the documentation as we most certainly have not covered every potential example here. Please refer to the Rails Command Line Docs for more information.

Command Line Generator Info


You can get all of this information on the command line.

rails generate with no generator name will output a list of all available generators and some information about global options. rails generate GENERATOR --help will list the options that can be passed to the specified generator.

rom3r4 / wget-exit-codes.txt
Created April 22, 2023 21:24 — forked from cosimo/wget-exit-codes.txt
wget exit codes
This is the list of exit codes for wget:
0 No problems occurred
1 Generic error code
2 Parse error — for instance, when parsing command-line options, the .wgetrc or .netrc…
3 File I/O error
4 Network failure
5 SSL verification failure
6 Username/password authentication failure
7 Protocol errors
rom3r4 /
Created April 5, 2023 16:21 — forked from omnisis/
Uploads a local M2 repo to a remote Nexus Server
#!/usr/bin/env python
Allows mirroring local M2 repositories to a remote Nexus server with a single command.
- uploading of common classifiers (sources, javadocs) if available
- using regex include pattern for artifactIds/groupIds
- recursively processing local repo, just point to the root
rom3r4 / clone.bash
Created March 1, 2023 21:13 — forked from milanboers/clone.bash
Clone all repositories of a Github user
curl -s | grep \"clone_url\" | awk '{print $2}' | sed -e 's/"//g' -e 's/,//g' | xargs -n1 git clone
function info {
cat <<- INFO
-- Script for downloading PRIVATE(!) git-repos as tar-archive on old systems (like Debian Etch)
-- That only have old git - binaries
rom3r4 / getMyCode.js
Created March 1, 2023 21:03 — forked from creationix/getMyCode.js
Script to download all repos for a user
// Run this with node and then run the output with sh
var Http = require('http')
var ChildProcess = require('child_process');"", function (err, json) {
if (err) throw err;
var data = JSON.parse(json);
data.repositories.forEach(function (repo) {
console.log("echo " + JSON.stringify( + " - " + repo.description));
console.log("git clone --bare " + repo.url);
rom3r4 / install-wget2
Last active September 28, 2022 11:52 — forked from davdenic/install-wget2
Install wget2 on macos
tar xf wget2-latest.tar.gz
cd wget2-*
brew install automake gettext lzip pkg-config xz gnutls
brew link --force gettext
make check
sudo make install
rom3r4 / gist:ed1678ac7881cc9b09973f887823bea3
Created January 16, 2022 02:32 — forked from voldy/gist:3699664
Ruby on Rails best practices

Ruby on Rails best practices

Code style

  • Use UTF-8. It’s 21 century, 8bit encodings dead now.
  • Use 2 space indent, not tabs
  • Use Unix-style line endings
  • Keep lines not longer than 80 chars
  • Remove trailing whitespace
* Jest Conversion script
* This script isn't the cleanest, and uses two different methods for performing global replaces... but it gets the job done.
* We switched from using the `replace` method to the `advancedReplace` about 70% of the way through, and couldn't go and retrofit
* `advancedReplace` everywhere with 100% confidence. However, should you use this script as a base for your own migration,
* I would definitely suggest using `advancedReplace`, which uses the node-replace library.
import {sync as globSync} from 'glob'
import {execSync} from 'child_process'
import fs from 'fs'
rom3r4 /
Created January 12, 2021 13:55 — forked from 0XDE57/
Firefox about:config privacy settings


about:config settings to harden the Firefox browser. Privacy and performance enhancements.
To change these settings type 'about:config' in the url bar. Then search the setting you would like to change and modify the value. Some settings may break certain websites from functioning and rendering normally. Some settings may also make firefox unstable.

I am not liable for any damages/loss of data.

Not all these changes are necessary and will be dependent upon your usage and hardware. Do some research on settings if you don't understand what they do. These settings are best combined with your standard privacy extensions (HTTPS Everywhere, NoScript/Request Policy, uBlock origin, agent spoofing, Privacy Badger etc), and all plugins set to "Ask To Activate".