Skip to content

Instantly share code, notes, and snippets.

View jasenmichael's full-sized avatar

Jasen Michael jasenmichael

View GitHub Profile
// camelCase
// PascalCase
// snake_case
// kebab-case
function toCamel(string) {
return string.replace(/(^\w{1})|(\s{1}\w{1})/g, match => match.toUpperCase()).replace(/ /g, '').replace(/^\w/, c => c.toLowerCase())
}
function toPascal(string) {
@jasenmichael
jasenmichael / kodilauncher.sh
Created January 24, 2019 23:08
replacement kodilauncher.sh for recalbox, will reboot to libreelec
#!/bin/sh
# use with libreelec addon - kodi-recalbox-launcher
# https://github.com/jasenmichael/kodi-recalbox-launcher
echo 9 > /sys/module/bcm2708/parameters/reboot_part
echo 9 > /sys/module/bcm2709/parameters/reboot_part
echo 9 > /sys/module/bcm2710/parameters/reboot_part
/sbin/reboot 9 || /sbin/reboot
sleep 5
@jasenmichael
jasenmichael / make-berryboot-squashimage.sh
Created January 12, 2019 18:34
script to make a berryboot squashed image from a normal rasberrypi image
#!/bin/bash
# usage
# ./make-berryboot-squashimage.sh /full/path/to/your-image-to-squash.img
# install dependencies
# sudo apt-get install kpartx
# sudo apt-get install squashfs-tools
img="${1##*/}"
@jasenmichael
jasenmichael / get-public-ip-from-terminal-bash.md
Created January 7, 2019 02:16
get public ip from terminal/bash

get public ip from terminal/bash

using dig

dig +short myip.opendns.com @resolver1.opendns.com

using wget

wget http://ipecho.net/plain -O - -q ; echo
@jasenmichael
jasenmichael / install-postman.sh
Created January 3, 2019 18:50
install postman ubuntu
#!/bin/bash
# Get postman app
wget https://dl.pstmn.io/download/latest/linux64 -O postman.tar.gz
sudo tar -xzf postman.tar.gz -C /opt
sudo ln -s /opt/Postman/Postman /usr/bin/postman
#Create a Desktop Entry
cat > ~/.local/share/applications/postman.desktop <<EOL
[Desktop Entry]
Encoding=UTF-8
@jasenmichael
jasenmichael / README.md
Last active October 17, 2024 21:34
how to rip/backup playstation (psx) games to iso for use with retropie emulationstation retroarch pcsx and other emulators

how to rip/backup playstation (psx) games to iso for use with retropie emulationstation retroarch pcsx and other emulators

I had recently been setting up retropie on one of my raspberrypi3's. I found all the psx .iso's I had made years ago ran perfect on the pi3 with retropie. It had been years since I backed up some of my old playstation games, and recently found some more lying around, I decided to add them to my retropie. After searching the internet, I rememberd I used achohol in windoze xp years ago, but now strickly a linux user.

At the time of this writing I am running UbuntuGnome 16.10 on my desktop so I found this method using cdrdao, bchunk, and a bash script

add main universe repo, edit /etc/apt/sources.list and add this line save and exit: deb http://us.archive.ubuntu.com/ubuntu yakkety main universe

update repositories

@jasenmichael
jasenmichael / index.js
Created December 29, 2018 03:01
get-file-path-name-ext-javascript created by jasenmichael - https://repl.it/@jasenmichael/get-file-path-name-ext-javascript
var path = require('path')
let file = "path/to/file/file.ext"
let filePath = path.dirname(file)
let fileName = file.split('.').pop()
let fileNameWithExtention = file.split('/').pop()
console.log('file: ',file)
@jasenmichael
jasenmichael / node-static-file-server.js
Last active December 29, 2018 17:35
a basic node static file server
const http = require('http');
const url = require('url');
const fs = require('fs');
const path = require('path');
const port = process.argv[2] || 9000;
http.createServer(function (req, res) {
console.log(`${req.method} ${req.url}`);
// parse URL
@jasenmichael
jasenmichael / index.html
Created December 26, 2018 19:23
Vuetify Fullscreen Carousel
<div id="app">
<v-app id="inspire">
<v-carousel
hide-controls
style="height:100%">
<v-carousel-item
v-for="(item,i) in items"
v-bind:src="item.src"
:key="i">
</v-carousel-item>
@jasenmichael
jasenmichael / index.html
Created December 24, 2018 18:40
VueFlix - Vue Streaming App
<div id="app">
<section class="hero is-primary is-medium">
<router-view></router-view>
<div class="hero-foot">
<div class="columns is-mobile">
<div v-for="movieChoice in movieChoices" class="column">
<router-link :to="`/${movieChoice.id}`" tag="li" class="movie-choice">
<i :class="[{ 'fa fa-check-circle favorite-check': movieChoice.favorite }]" aria-hidden="true"></i>
<img :src="`${movieChoice.smallImgSrc}`" class="desktop"/>