Skip to content

Instantly share code, notes, and snippets.

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

Jose Peleteiro peleteiro

🏠
Working from home
View GitHub Profile
@sts10
sts10 / rust-command-line-utilities.markdown
Last active July 26, 2024 12:55
A curated list of command-line utilities written in Rust

A curated list of command-line utilities written in Rust

Note: I have moved this list to a proper repository. I'll leave this gist up, but it won't be updated. To submit an idea, open a PR on the repo.

Note that I have not tried all of these personally, and cannot and do not vouch for all of the tools listed here. In most cases, the descriptions here are copied directly from their code repos. Some may have been abandoned. Investigate before installing/using.

The ones I use regularly include: bat, dust, fd, fend, hyperfine, miniserve, ripgrep, just, cargo-audit and cargo-wipe.

  • atuin: "Magical shell history"
  • bandwhich: Terminal bandwidth utilization tool
@HactarCE
HactarCE / - Factorio - 4-lane RHD Modular Rail System.md
Last active May 31, 2024 07:28
Factorio - 4-lane RHD Modular Rail System

Factorio Modular Rail System

All blueprints are RHD (right-hand drive)

Modules are 42x42 (big electric poles overlap on neighboring modules)

Included blueprint books:

  • MRS - 2 Lane - RHD - 20 blueprints
  • MRS - 2 Lane Single - RHD - 34 blueprints
  • MRS - 4 Lane - RHD - 25 blueprints
import Keys._
name := "hello"
version := "1.0"
scalaVersion := "2.10.2"
lazy val hello = taskKey[Unit]("A custom run task.")
@Stanback
Stanback / nginx.conf
Last active February 4, 2022 18:05
Example Nginx configuration for serving pre-rendered HTML from Javascript pages/apps using the Prerender Service (https://github.com/collectiveip/prerender).Instead of using try_files (which can cause unnecessary overhead on busy servers), you could check $uri for specific file extensions and set $prerender appropriately.
# Note (November 2016):
# This config is rather outdated and left here for historical reasons, please refer to prerender.io for the latest setup information
# Serving static html to Googlebot is now considered bad practice as you should be using the escaped fragment crawling protocol
server {
listen 80;
listen [::]:80;
server_name yourserver.com;
root /path/to/your/htdocs;
@madis
madis / gist:4650014
Created January 27, 2013 19:40
Testing CORS OPTIONS request with curl
curl \
--verbose \
--request OPTIONS \
http://localhost:3001/api/configuration/visitor \
--header 'Origin: http://localhost:9292' \
--header 'Access-Control-Request-Headers: Origin, Accept, Content-Type' \
--header 'Access-Control-Request-Method: GET'
# http://nils-blum-oeste.net/cors-api-with-oauth2-authentication-using-rails-and-angularjs/#.UQJeLkp4ZyE
@evo42
evo42 / commands-api-example.html
Created August 29, 2012 09:29
Aloha/UI: using Aloha Editor commands API for your own toolbar
<html>
<head>
<link rel="stylesheet" href="http://aloha-editor.org/builds/development/latest/src/css/aloha.css"
type="text/css">
<script src="http://aloha-editor.org/builds/development/latest/src/lib/aloha.js"></script>
</head>
<body>
<button id="bold">Bold</button>
@jgdavey
jgdavey / hinder.sh
Created May 14, 2012 21:03
Simulate network latency and packet loss on Mac OS X (requires sudo)
#!/bin/bash
set -e
USAGE="Usage: $0 [ip_address | reset]"
if [ "$#" == "0" ]; then
echo "$USAGE"
exit 1
fi
@evo42
evo42 / aloha-config.js
Created December 8, 2011 19:52
Aloha Editor -- send content via ajax to a backend php script to save the data edited with Aloha Editor
( function ( window, undefined ) {
var Aloha = window.Aloha || ( window.Aloha = {} );
Aloha.settings = {
logLevels: { 'error': true, 'warn': true, 'info': true, 'debug': false, 'deprecated': true },
errorhandling: false,
ribbon: false,
locale: 'en',
floatingmenu: {
width: 630,
@didip
didip / tornado-nginx-example.conf
Created January 30, 2011 05:19
Nginx config example for Tornado
worker_processes 2;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
use epoll;
}
require "rubygems"
require "json"
require "open-uri"
CONCURSOS = 1188..1195
APOSTAS = [[10, 12, 14, 34, 37, 49], [14, 27, 31, 39, 40, 53], [2, 10, 22, 43, 44, 51]]
CONCURSOS.each do |concurso|
resultado = JSON.load(open("http://apiz.heroku.com/megasena/#{concurso}.json")) rescue next