Skip to content

Instantly share code, notes, and snippets.

View iax7's full-sized avatar

Isaias Piña iax7

View GitHub Profile
@iax7
iax7 / color.rb
Last active December 30, 2023 00:35
Simple class to generate ANSI Color output
# @example basic usage
# Color.blue => "\e[1;34m"
# @example chain bold
# Color.red.bold => "\e[1;31m"
class Color
NORMAL = 30
BRIGHT = 90
BG_DIFF = 10
CODES = {
black: 0,
@iax7
iax7 / .gitconfig
Created December 10, 2021 23:00
My git config file
# https://git-scm.com/docs/git-config
[include]
path = ~/.iax/.gitcolors
[user]
# Email -- env: GIT_AUTHOR_EMAIL, GIT_COMMITTER_EMAIL
# gpg --list-secret-keys (-K) --keyid-format LONG
name = Isaias Piña
email = iax7@users.noreply.github.com
signingkey = ADBCA369E9699747
# https://git-scm.com/docs/git-config#_conditional_includes
@iax7
iax7 / wisper.rb
Created June 3, 2021 12:07
Wisper Gem Usage basic example
require 'wisper'
SLEEP = 0.5
class Sync
include Wisper::Publisher
def start(user_id)
broadcast :start, user_id
sleep SLEEP
@iax7
iax7 / api.js
Created February 16, 2021 16:59
Middleware
import { createAction } from "@reduxjs/toolkit";
export const apiCallBegan = createAction("api/callBegan");
export const apiCallSuccess = createAction("api/callSuccess");
export const apiCallFailed = createAction("api/callFailed");
@iax7
iax7 / pi-hole.conf
Last active October 20, 2023 03:36
unbound for pihole
server:
# If no logfile is specified, syslog is used
# logfile: "/var/log/unbound/unbound.log"
verbosity: 0
interface: 127.0.0.1
port: 5335
do-ip4: yes
do-udp: yes
do-tcp: yes
@iax7
iax7 / Set-Folder-Icon.ps1
Last active November 16, 2020 17:52
Set-Folder-Icon
$TargetDirectory = "." # "C:\Users\itdroplets\Desktop\tmp\Folder3"
$DesktopIni = @"
[.ShellClassInfo]
IconResource=.icon.ico,0
"@
If (Test-Path "$($TargetDirectory)\download.png") { Rename-Item "$($TargetDirectory)\download.png" -NewName .icon.png }
If (Test-Path "$($TargetDirectory)\download.ico") { Rename-Item "$($TargetDirectory)\download.ico" -NewName .icon.ico }
#!/bin/env bash
# https://www.lastdragon.net/?p=2260
cat > programa.c << EOF
#include <stdio.h>
double powern(double d, unsigned n)
{
double x = 1.0;
unsigned j;
# https://ryanparman.com/posts/2019/using-gnu-command-line-tools-in-macos-instead-of-freebsd-tools/
# core
brew install coreutils
# key commands
brew install binutils
brew install diffutils
brew install ed
brew install findutils

Keybase proof

I hereby claim:

  • I am iax7 on github.
  • I am iax (https://keybase.io/iax) on keybase.
  • I have a public key whose fingerprint is 502F 5154 D385 30B9 9EFE EB79 7452 12D9 0C38 D1E9

To claim this, I am signing this object:

@iax7
iax7 / bash-cheatsheet.sh
Created March 29, 2016 15:24 — forked from LeCoupa/bash-cheatsheet.sh
Bash CheatSheet for UNIX Systems
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04