Skip to content

Instantly share code, notes, and snippets.

View paulodiovani's full-sized avatar

Paulo Diovani Gonçalves paulodiovani

View GitHub Profile
@crispyricepc
crispyricepc / install-instructions.md
Last active June 17, 2024 17:18
wlprop - An xprop clone for wlroots based compositors

Dependencies

Make sure you have installed the following commands:

  • swaymsg
  • jq
  • slurp
  • awk

Installation

@advaith1
advaith1 / discordjs-slash-commands.md
Last active April 20, 2024 05:39
Slash Commands in Discord.js
@castwide
castwide / rails.rb
Last active April 27, 2024 08:54
Enhance Rails Intellisense in Solargraph
# The following comments fill some of the gaps in Solargraph's understanding of
# Rails apps. Since they're all in YARD, they get mapped in Solargraph but
# ignored at runtime.
#
# You can put this file anywhere in the project, as long as it gets included in
# the workspace maps. It's recommended that you keep it in a standalone file
# instead of pasting it into an existing one.
#
# @!parse
# class ActionController::Base
@asarkar
asarkar / csd-wrapper.sh
Last active October 26, 2022 07:13 — forked from l0ki000/csd-wrapper.sh
Cisco Anyconnect CSD wrapper for OpenConnect macOS client
#!/bin/bash
# Enter your vpn host here
CSD_HOSTNAME=
if [[ -z ${CSD_HOSTNAME} ]]
then
echo "Define CSD_HOSTNAME with vpn-host in script text. Exiting."
exit 1
fi
@matheusazzi
matheusazzi / poker.ex
Last active July 20, 2017 17:12
poker.ex
defmodule Poker do
## Rank a poker hand
##
## Card is {:suit, value}, e.g. {:heart, 3}
## Hand is a list of 5 cards
##
## Poker.rank [{:heart, 10}, {:club, 11}, {:heart, 9}, {:diamond, 12}, {:heart, 13}]
## >> :straight
def rank(hand) do
@akitaonrails
akitaonrails / BACKEND.md
Last active April 3, 2024 19:49
Codeminer 42 - BACKEND Test

TRZ (The Resident Zombie) - Backend

Problem Description

The world, as we know it, has fallen into an apocalyptic scenario. The "Influenzer T-Virus" (a.k.a. Twiter Virus) is transforming human beings into stupid beasts (a.k.a. Zombies), hungry to cancel humans and eat their limbs.

You, the last survivor who knows how to code, will help the resistance by deploying a system to connect the remaining humans. This system will be essential to detect new infections and share resources between the members.

Requirements

@sirkitree
sirkitree / node.js
Last active December 24, 2018 15:31
Parse a PHP file with Node.js and convert an array defined in the PHP script into a JSON object which the Node app can use.
var runner = require('child_process');
runner.exec(
'php -r \'include("settings.php"); print json_encode($databases);\'',
function (err, stdout, stderr) {
var connection = JSON.parse(stdout).default.default;
console.log(connection.database);
// result botdb
}