Skip to content

Instantly share code, notes, and snippets.

View thiagolinhares's full-sized avatar

Thiago Linhares thiagolinhares

View GitHub Profile
@Nick-Gabe
Nick-Gabe / Pombify.js
Last active January 6, 2024 01:57
Transforma uma string em pombês, e traduz para a língua dos humanos.
const pombify = (phrase) => {
return phrase
.split(' ')
.map((word) => {
const wordLetters = word.split('')
return wordLetters
.map((letter, index) => {
const charCode = letter.charCodeAt(0);
const binary = charCode
.toString(2)
@holly
holly / check_drbd.sh
Created June 28, 2015 13:27
keepalived+drbd sample
#!/bin/bash
EXIT_CODE=0
STATUS_FILE=/tmp/drbd.status
STATUS=$(sed -e 's/.* state:\(.*\)$/\1/' $STATUS_FILE)
if [ "${STATUS}" != "MASTER" ]; then
echo "current status is ${STATUS}. skip"
exit
@alberthdev
alberthdev / reinstall_deb.sh
Created April 5, 2015 20:29
Script to reinstall all Debian packages on the system
#!/bin/bash
# Debian System Reinstaller
# Copyright (C) 2015 Albert Huang
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,