Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@parties
parties / renameReactJsToJsx.sh
Last active April 23, 2024 12:06
rename all *.js files containing React markup to *.jsx
# finds all *.js files that have either `</` or `/>` tags in them and renames them to *.jsx
find ./src -type f -name '*.js' -not -name '*.jsx' -not -name '*.ejs' -exec bash -c 'grep -l -E "</|/>" "$0"' {} \; -exec bash -c 'mv "$0" "${0%.js}.jsx"' {} \;
@Meltwin
Meltwin / Noetic-Ubuntu22.04.md
Last active April 23, 2024 12:05
Installing ROS1 Noetic on Ubuntu 22.04

The process is pretty similar to the standard installation from source except for some fixes that you will have to make during the installation. I will keep the same header so you can keep a track on both guide at the same time (follow the official website for more explication, I will only write the steps to make).

1 - Prerequisites

1.1 - Installing bootstrap dependencies

To install bootstrap dependencies

@bmaupin
bmaupin / free-database-hosting.md
Last active April 23, 2024 12:03
Free database hosting
@jasonrudolph
jasonrudolph / 00-about-search-api-examples.md
Last active April 23, 2024 12:01
5 entertaining things you can find with the GitHub Search API
@Nihhaar
Nihhaar / linux_performance.md
Created September 18, 2017 18:42 — forked from marianposaceanu/linux_performance.md
Linux simple performance tweaks

Linux simple performance tweaks

Change the I/O Scheduler

Open $ vim /etc/default/grub then add elevator=noop next to GRUB_CMDLINE_LINUX_DEFAULT. Run $ update-grub and $ cat /sys/block/sda/queue/scheduler to be sure that noop is being used:

$ vim /etc/default/grub
$ update-grub
$ cat /sys/block/sda/queue/scheduler

[noop] deadline cfq

import hashlib as hasher
import datetime as date
# Define what a Snakecoin block is
class Block:
def __init__(self, index, timestamp, data, previous_hash):
self.index = index
self.timestamp = timestamp
self.data = data
self.previous_hash = previous_hash
@leocomelli
leocomelli / git.md
Last active April 23, 2024 11:59
Lista de comandos úteis do GIT

GIT

Estados

  • Modificado (modified);
  • Preparado (staged/index)
  • Consolidado (comitted);

Ajuda

@reachlin
reachlin / prometheus.yml
Created April 19, 2017 07:06
sample prometheus configuration explained
// For all the confusing Prometheus configuration and
// regular expressions,
// explained in examples.
// Remember, there are default values for each item if it's missing.
// regex is (.*),
// replacement is $1,
// separator is ;
// ,and action is replace
@extremeshok
extremeshok / reboot-modem.js
Created January 8, 2018 23:18 — forked from jonathanhoskin/reboot-modem.js
Huawei B315 Modem Reboot Script
// PhantomJS script to reboot a Huawei B315 modem
//
// Author: Jonathan Hoskin / 2017-09-02
// Twitter: @jhossnz
// Github: https://github.com/jonathanhoskin
//
// Requires PhantomJS ~ 2.1.1
//
// Enter your own modem details here
var username = 'admin';
@laytan
laytan / main.odin
Last active April 23, 2024 11:57
Graphviz Odin dependencies
package main
import "core:fmt"
import "core:io"
import "core:odin/ast"
import "core:odin/parser"
import "core:os"
import "core:path/filepath"
import "core:slice"
import "core:strings"