Skip to content

Instantly share code, notes, and snippets.

View Mexidense's full-sized avatar
📗
"Stay hungry. Stay foolish"

Salvador Briones Mexidense

📗
"Stay hungry. Stay foolish"
View GitHub Profile
⭐️ feat: add beta sequence (new feature)
🛠 fix: remove broken confirmation message (bug fix)
♻️ refactor: share logic between 4d3d3d3 and flarhgunnstow (refactoring production code)
🌈 style: convert tabs to spaces (formatting, missing semi colons, etc; no code change)
🔍 test: ensure Tayne retains clothing (adding missing tests, refactoring tests; no production code change)
😒 chore: add Oyster build script (updating grunt tasks etc; no production code change)
📝 docs: explain hat wobble (changes to documentation)
Sources:
https://seesparkbox.com/foundry/semantic_commit_messages
@ibrunotome
ibrunotome / laravel-ddd-approach.md
Last active August 25, 2023 23:25
A Domain Driven Design (DDD) approach to the Laravel Framework
/app
├── /Application
|  ├── /Exceptions
|  ├── /Middlewares
|  ├── /Providers
|  ├── /Requests
├── /Domain
|  ├── /MyDomainA
| | ├── /Contracts
@hardianlawi
hardianlawi / download_images.sh
Last active March 22, 2024 05:26
Bash script to download images based on a list of urls
# This script is used to download images given a list of urls
imgdir=$1
urllist=$2
mkdir $imgdir
while read p;
do
wget $p -P $imgdir
done < $urllist

Luhn test

The Luhn test is used by some credit card companies to distinguish valid credit card numbers from what could be a random selection of digits. Those companies using credit card numbers that can be validated by the Luhn test have numbers that pass the following test: Reverse the order of the digits in the number. Take the first, third, ... and every other odd digit in the reversed digits and sum them to form the partial sum s1 Taking the second, fourth ... and every other even digit in the reversed digits: Multiply each digit by two and sum the digits if the answer is greater than nine to form partial sums for the even digits Sum the partial sums of the even digits to form s2. If s1 + s2 ends in zero then the original number is in the form of a valid credit card number as verified by the Luhn test.

// Report on "stuck" ether in empty contracts
// https://github.com/ethereum/EIPs/issues/156
// Usage: node find-stuck-ether.js [startBlock] [endBlock] > report.txt
let Eth = require('ethjs');
let eth = new Eth(new Eth.HttpProvider('http://localhost:8545'));
let ethutil = require('ethereumjs-util')
async function main() {
@jgamblin
jgamblin / slackspotify.sh
Created April 19, 2017 01:10
A Script To Set Current Spotify Song As Slack Status
#!/bin/bash
APIKEY="From Here https://api.slack.com/custom-integrations/legacy-tokens"
SONG=$(osascript -e 'tell application "Spotify" to name of current track as string')
URLSONG=$(echo "$SONG" | perl -MURI::Escape -ne 'chomp;print uri_escape($_),"\n"')
while true
do
curl -s -d "payload=$json" "https://slack.com/api/users.profile.set?token="$APIKEY"&profile=%7B%22status_text%22%3A%22"$URLSONG"%22%2C%22status_emoji%22%3A%22%3Amusical_note%3A%22%7D" > /dev/null
sleep 60
done
@ankurk91
ankurk91 / github_gpg_key.md
Last active June 7, 2024 14:31
Signing git commits using GPG (Ubuntu/Mac)

Github : Signing commits using GPG (Ubuntu/Mac) 🔐

  • Do you have an Github account ? If not create one.
  • Install required tools
  • Latest Git Client
  • gpg tools
# Ubuntu
sudo apt-get install gpa seahorse
# MacOS with https://brew.sh/
@irazasyed
irazasyed / homebrew-permissions-issue.md
Last active June 14, 2024 17:01
Homebrew: Permissions Denied Issue Fix (OS X / macOS)

Homebrew Permissions Denied Issues Solution

sudo chown -R $(whoami) $(brew --prefix)/*

@rxaviers
rxaviers / gist:7360908
Last active July 25, 2024 19:00
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@wandernauta
wandernauta / sp
Last active July 10, 2024 07:57
sp is a command-line client for Spotify's dbus interface. Play, pause, skip and search tracks from the comfort of your command line.
#!/usr/bin/env bash
#
# This is sp, the command-line Spotify controller. It talks to a running
# instance of the Spotify Linux client over dbus, providing an interface not
# unlike mpc.
#
# Put differently, it allows you to control Spotify without leaving the comfort
# of your command line, and without a custom client or Premium subscription.
#