Skip to content

Instantly share code, notes, and snippets.

View jmcerrejon's full-sized avatar
🏠
Working home

Jose Cerrejon jmcerrejon

🏠
Working home
View GitHub Profile
@jmcerrejon
jmcerrejon / gitserver.sh
Created November 2, 2014 19:52
Git Server on Raspberry Pi
#!/bin/bash
#
# Description : Git Server
# Author : Jose Cerrejon Gonzalez (ulysess@gmail_dot._com)
# Version : 0.1 (2/Nov/14)
#
# HELP · http://www.instructables.com/id/GitPi-A-Private-Git-Server-on-Raspberry-Pi/all/?lang=es
#
clear
IP=$(hostname -I)
#!/bin/bash
#
# Description : Git Server
# Author : Jose Cerrejon Gonzalez (ulysess@gmail_dot._com)
# Version : 1.0 (2/Nov/14)
#
# HELP · http://www.instructables.com/id/GitPi-A-Private-Git-Server-on-Raspberry-Pi/all/?lang=es
#
clear
IP=$(/sbin/ifconfig eth0 | grep "inet addr" | awk -F: '{print $2}' | awk '{print $1}')
@jmcerrejon
jmcerrejon / alloy.js
Created January 30, 2018 12:14 — forked from SquirrelMobile/alloy.js
Upload large video from Axway Titanium mobile application (iOS / Android) and save the video with PHP script
//Download and install widget loader : https://github.com/FokkeZB/nl.fokkezb.loading
Alloy.Globals.loading = Alloy.createWidget("nl.fokkezb.loading");
@jmcerrejon
jmcerrejon / vulkan.sh
Last active July 14, 2020 15:19
Install vulkan driver (experimental) no wayland (check comments). Just for testing
#!/bin/bash -ex
#
# Description : Vulkan driver (EXPERIMENTAL)
# Author : Jose Cerrejon Gonzalez (ulysess@gmail_dot._com)
# Version : 1.0.0 (14/Jul/20)
# Compatible : Raspberry Pi 4
#
# Info : Thks to PI Labs
# Help : https://ninja-build.org/manual.html#ref_pool
# : https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=276412&start=25#p1678723
@jmcerrejon
jmcerrejon / install_box86.sh
Last active November 5, 2020 10:47
Install Box86
#!/bin/bash
#
# Description : Box86
# Author : Jose Cerrejon Gonzalez (ulysess@gmail_dot._com)
# Version : 1.0.0 (05/Nov/20)
# Repository : https://github.com/ptitSeb/box86
#
clear
readonly INSTALL_DIR="$HOME/box86"
@jmcerrejon
jmcerrejon / mesa.sh
Created November 5, 2020 19:22
Install Mesa driver with Vulkan support
#!/bin/bash
#
# Description : Install Mesa/Vulkan
# Author : Jose Cerrejon Gonzalez (ulysess@gmail_dot._com)
# Version : 1.0.0 (06/Nov/20)
# Repository : git://anongit.freedesktop.org/mesa/mesa
#
clear
readonly INSTALL_DIR="$HOME/mesa"
@jmcerrejon
jmcerrejon / index.js
Created December 30, 2020 10:50
Glass Morphic Maker concept for iOS using Axway Titanium
const win = Ti.UI.createWindow({
backgroundImage: '/images/background_bubles.png',
backgroundRepeat: false,
});
const lbTitle = Ti.UI.createLabel({
color: '#7C34C6',
font: {
fontSize: 32,
},
@jmcerrejon
jmcerrejon / backup.sh
Last active April 18, 2021 04:25
Zip the current Titanium project on macOS
#!/usr/bin/bash
#
# Description: Zip the current Titanium project on macOS
# File: backup.sh
# Author: Jose Cerrejon (ulysess_at_gmail.com)
# Help: Copy in the root of your Titanium project and Add to package.json the script: "backup": "sh backup.sh",
#
clear
stop_liveview() {
@jmcerrejon
jmcerrejon / repo_info.sh
Created April 27, 2021 16:45
Get repo info from GitHub
# brew install curl jq
# More info at: https://docs.github.com/en/rest/reference/repos#list-forks
repo_info() {
if [[ $1 == "" ]]; then
echo "Please, input a repo. Ex: jmcerrejon/pikiss"
return 0
fi
curl -H 'Accept: application/vnd.github.v3+json' \
"https://api.github.com/repos/$1/forks?sort=newest" | # sort = newest, oldest, or stargazers
jq '.[] | {name: .full_name, updated: .updated_at, stars: .stargazers_count}'
@jmcerrejon
jmcerrejon / install_node.sh
Created October 16, 2021 12:13
Just install Node.js on Debian. (Tested on Raspberry Pi OS).
#!/bin/bash
#
# Intall Node.js (all versions)
#
install_node() {
local NODE_VERSION
if which node >/dev/null; then
read -p "Warning!: Node.js already installed (Version $(node -v)). Do you want to uninstall it (y/n)?: " option
case "$option" in