Skip to content

Instantly share code, notes, and snippets.

@rom3r4
rom3r4 / wget-exit-codes.txt
Created April 22, 2023 21:24 — forked from cosimo/wget-exit-codes.txt
wget exit codes
View wget-exit-codes.txt
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
rom3r4 / nexus-uploader.py
Created April 5, 2023 16:21 — forked from omnisis/nexus-uploader.py
Uploads a local M2 repo to a remote Nexus Server
View nexus-uploader.py
#!/usr/bin/env python
""""
nexus-uploader.py
Allows mirroring local M2 repositories to a remote Nexus server with a single command.
Supports:
- 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
rom3r4 / clone.bash
Created March 1, 2023 21:13 — forked from milanboers/clone.bash
Clone all repositories of a Github user
View clone.bash
curl -s https://api.github.com/users/milanboers/repos | grep \"clone_url\" | awk '{print $2}' | sed -e 's/"//g' -e 's/,//g' | xargs -n1 git clone
View git-download-private-repo-tarball.sh
#!/bin/bash
CF=~/.git-dprz.sh
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
rom3r4 / getMyCode.js
Created March 1, 2023 21:03 — forked from creationix/getMyCode.js
Script to download all repos for a user
View getMyCode.js
// Run this with node and then run the output with sh
var Http = require('http')
var ChildProcess = require('child_process');
Http.cat("http://github.com/api/v2/json/repos/show/creationix", function (err, json) {
if (err) throw err;
var data = JSON.parse(json);
data.repositories.forEach(function (repo) {
console.log("echo " + JSON.stringify(repo.name + " - " + repo.description));
console.log("git clone --bare " + repo.url);
});
@rom3r4
rom3r4 / install-wget2
Last active September 28, 2022 11:52 — forked from davdenic/install-wget2
Install wget2 on macos
View install-wget2
wget https://gnuwget.gitlab.io/wget2/wget2-latest.tar.gz
tar xf wget2-latest.tar.gz
cd wget2-*
brew install automake gettext lzip pkg-config xz gnutls
brew link --force gettext
./configure
make
make check
sudo make install
@rom3r4
rom3r4 / gist:ed1678ac7881cc9b09973f887823bea3
Created January 16, 2022 02:32 — forked from voldy/gist:3699664
Ruby on Rails best practices
View gist:ed1678ac7881cc9b09973f887823bea3

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
@rom3r4
rom3r4 / TestUtil.java
Created November 25, 2021 11:50
TestUtil.java
View TestUtil.java
package com.mycompany.myapp.web.rest;
import static org.assertj.core.api.Assertions.assertThat;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
import java.io.IOException;
import java.math.BigDecimal;
View jest-convert.js
/**
* 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
rom3r4 / config.md
Created January 12, 2021 13:55 — forked from 0XDE57/config.md
Firefox about:config privacy settings
View config.md

ABOUT

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".