Skip to content

Instantly share code, notes, and snippets.

View chojayr's full-sized avatar

Luis R. Lavina Jr. chojayr

View GitHub Profile
@chojayr
chojayr / native-asset-design.md
Created March 17, 2021 06:50 — forked from yihuang/native-asset-design.md
native asset design patterns

native asset design patterns

Fixed max supply

Problem

You want your token to have fixed max supply (NFT is just token with 1 max supply).

Solution

@chojayr
chojayr / Python2.7-Pip-Virtualenv.md
Created April 9, 2018 09:26 — forked from hrushikesh198/Python2.7-Pip-Virtualenv.md
Python2.7, Pip, Virtualenv Installation on Mac or Linux machines for the current user without sudo access

#Installing Python2.7 If you download a different version it should work similarly.

cd ~
wget https://www.python.org/ftp/python/2.7.13/Python-2.7.13.tgz
tar -xzvf Python-2.7.13.tgz
cd Python-2.7.13
./configure 
make altinstall prefix=~/.local/
@chojayr
chojayr / ruby.2.4.1-setup.sh
Created October 25, 2017 14:39 — forked from mustafaturan/ruby.2.6.3-setup.sh
ruby 2.4.1 setup for centos 6.x
#!/usr/bin/env bash
# repository
cd /tmp
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -Uvh epel-release-6-8.noarch.rpm
# system update
yum -y update
yum -y groupinstall "Development Tools"
yum -y install libxslt-devel libyaml-devel libxml2-devel gdbm-devel libffi-devel zlib-devel openssl-devel libyaml-devel readline-devel curl-devel openssl-devel pcre-devel git memcached-devel valgrind-devel mysql-devel ImageMagick-devel ImageMagick
@chojayr
chojayr / git_rm_shortcut.md
Created January 17, 2017 14:14
removing from git repo the mulitple files deleted on disk

removing from git repo the mulitple files deleted on disk

git ls-files --deleted -z | xargs -0 git rm
#!/bin/bash
####################################
### Just a curl result into json ###
####################################
### How to: $./curl_result2json.sh yoursite2check ###
log=curl_result_`date +"%F"`.json
site=$1
###############################################################################
# The MIT License
#
# Copyright 2012-2014 Jakub Jirutka <jakub@jirutka.cz>.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
@chojayr
chojayr / README.md
Last active August 29, 2015 14:05
azure_brood

azure_brood

Another lame script to create or delete VM on Windows Azure
How to use?
Basically You need to install first the required gem
* azure
* yaml
* json
@chojayr
chojayr / README.md
Last active May 31, 2017 13:04
racktables-propel

racktables-propel

racktables-propel is created to automate the task of adding the server(physical | virtual) information to the Racktables, information like system serial number, CPU count, memory, operating system installed and version, kernel release, system model, uuid etc. this will eliminate the manual input of the server information on Racktables and also avoid to missed and forget the task of including the server(and its info) on the Racktables(which is always happened) especially when there's a machine that's freshly build.

racktables-propel is a script created using Ruby and the following library(gems)

facter - to extract the system information yaml - to convert the extracted information on yaml and parse the converted yaml info

@chojayr
chojayr / dashing_zabbix_trigger.md
Last active November 28, 2023 16:39
Dashboard(Dashing) Zabbix Triggers

Dashing dashboard for zabbix trigger

zabbix trigger zabbix trigger

This will provide the total number of alerts on triggers status

  • flash when there's an alert/triggers (color based on the zabbix trigger color format)
  • trigger = Warning, Average, High & Disaster
  • unacknowledge triggers