Skip to content

Instantly share code, notes, and snippets.

Avatar

Tiana Rakoto Arimanana b23prodtm

View GitHub Profile
@b23prodtm
b23prodtm / gitlab-runner-docker.sh
Last active Jul 16, 2020
Setup a Unix Runner on GitLab. To perform our own gitlab-runner at home.
View gitlab-runner-docker.sh
#!/usr/bin/env bash
# to enable all branches, remove .gitlab-ci only:[/pr-*/] tags
shared=/srv
[ ! -e /etc/os-release ] && shared=/Users/Shared && echo "Not a Linux system.. srv=$shared"
shared_tags='light, docker, c3.small.x86'
PROJECT_REGISTRATION_TOKEN=''
[ "$#" -gt 0 ] && PROJECT_REGISTRATION_TOKEN=$1
printf "token PROJECT_REGISTRATION_TOKEN=%s\n" "${PROJECT_REGISTRATION_TOKEN}"
gitlab=$(docker ps -q -a -f "name=gitlab-runner")
[ "$gitlab" != "" ] && docker stop $gitlab && docker rm -f $gitlab
@b23prodtm
b23prodtm / WebDD.sh
Last active Apr 22, 2020
Unofficial Web Drivers nvda (translated from Chinese daliansky/Hackintosh)
View WebDD.sh
#!/bin/bash
#WebDD v1.7
r="\\033[31;1m"
g="\\033[32;1m"
b="\033[36m"
k="\033[30m"
d="\\033[0m"
rm -rf /tmp/expanded.pkg 2>/dev/null
rm -rf /tmp/WebDriver-"$download_version".pkg 2>/dev/null
rm -rf /tmp/nvtmp 2>/dev/null
@b23prodtm
b23prodtm / auto-reboot.sh
Last active Oct 30, 2019
Check if the system dpkg need a restart and send corresponding signal, as a service
View auto-reboot.sh
#!/bin/bash
# auto-reboot
# description: Check if the system dpkg need a restart and send corresponding signal
start() {
# code to start app comes here
# example: bahs -c "program_name" &
bash -c "while [ ! -f /var/run/reboot-required ]; do sleep 30; done; cat /var/run/reboot-required.dpkgs 2> /dev/null; reboot" &
echo $! > /var/run/chkdpkgs.pid
}
View git-rm-submodule.sh
#!/usr/bin/env bash
usage="--- https://gist.github.com/b23prodtm/f285017729204b8c7cefb58cf5bdd304
Usage: $0 git-rm-submodule <path_to_submodule"
[ "$#" -lt 1 ] && echo -e $usage && exit 1
path=$1
git rm -r --cached $path
git commit -m "Removed submodule "
rm -rf .git/modules/$path
@b23prodtm
b23prodtm / deflate-kernel8-rpi-3-b.sh
Last active Jul 22, 2019
Inflate in /boot/firmware. Place the MicroSD on to the Raspberry Pi 3 and power it on.
View deflate-kernel8-rpi-3-b.sh
#!/bin/bash
WORKDIR=$(pwd)
[ -z $1 ] && echo "Usage: $0 <system-boot-folder>" && exit 0
cd $1
echo "//config.txt
# Serial console output!
enable_uart=1
# 64bit-mode
@b23prodtm
b23prodtm / systemctl-wpa-supplicant.sh
Created Apr 17, 2019
Configure and enable wifi client with Ubuntu server LTS
View systemctl-wpa-supplicant.sh
#!/usr/bin/env bash
# Usage: $ scripts/systemctl-wpa-supplicant.sh
# source: https://www.linuxbabe.com/command-line/ubuntu-server-16-04-wifi-wpa-supplicant
#
function cfrm_act () {
def_go=$2
y='y'
n='n'
[ "$def_go" == "$y" ] && y='Y'
[ "$def_go" == "$n" ] && n='N'
View hosts.ini
[all]
raspberrypib ansible_ssh_host=192.168.0.36 ansible_user=ubuntu ansible_become=yes ansible_host=192.168.0.36 ip=192.168.0.36 etcd_member_name=etcd1
raspberrypia ansible_ssh_host=192.168.0.37 ansible_user=ubuntu ansible_become=yes ansible_host=192.168.0.37 ip=192.168.0.37
# [bastion]
# macrouter
[kube-master]
raspberrypib
View hosts.ini
#hosts.ini
[all]
raspberrypi ansible_ssh_host=192.168.0.16 ip=192.168.0.16 ansible_host=192.168.0.16 ansible_user=pi
[kube-master]
raspberrypi
[etcd]
raspberrypi
@b23prodtm
b23prodtm / WakeUpDVD
Created Oct 23, 2018
Wake Up DVD Drive Unsupported Mac
View WakeUpDVD
#!/bin/bash
# Sometimes optical disc cannot load with third-party optical drives.
# They may have fallen to sleep mode, ejected discs, etc.
# That can happen if an unsupported OSX version is installed on your Mac (10.13 on iMac 2009).
# This wakes up any optical drive installed on your Mac from the finder.
# INSTALL
# =======
# Save this script to a desktop file named WekeUpDVD and make it executable
# cd ~/Desktop && chmod a+x WakeUpDVD
# Double-click to run the script, a Terminal Window will open and close itself.
View README.md

this scripts installs: Flash, PDF, for some Chromium OS builds. (confirmed on Vanilla build 3389 Built on 12th December 2012!) Carputers confirmed that it also works on ArnoldTheBat's Cx86OS-20130423010101 build!

Sadly enough the Hangouts stopped working! i don't know about Netflix, since i can't test it. and since ~4-08-2013 MP3/Mp4 stopped working?

if you want to use this script on ArnoldTheBat's Chromium OS build, keep in mind that he uses the password: "password" instead of "facepunch". (without the quotes ;))

You can’t perform that action at this time.