Skip to content

Instantly share code, notes, and snippets.

View ryanamaral's full-sized avatar

Ryan Amaral ryanamaral

View GitHub Profile

How do I clone a GitHub wiki?

Any GitHub wiki can be cloned by appending wiki.git to the repo url, so the clone url for the repo https://myorg/myrepo/ is: git@github.com:myorg/myrepo.wiki.git (for ssh) or https://github.com/my/myrepo.wiki.git (for https).

You make edits, and commit and push your changes, like any normal repo. This wiki repo is distinct from any clone of the project repo (the repo without wiki.get appended).

How do I add images to a wiki page?

@ryanamaral
ryanamaral / gh-pages-deploy.md
Created June 12, 2021 08:46 — forked from cobyism/gh-pages-deploy.md
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

@ryanamaral
ryanamaral / 0_README.md
Last active August 9, 2023 09:19
[NAS] How to setup OMV5 in Raspberry Pi 4 + Emby + Transmission + Syncthing + Photoview + GooglePhotosBackup

How to setup OMV5 in a Raspberry Pi 4 with all the extras :)

Install Raspberry Pi OS Lite (32 Bit) and enable SSH:

$ cd /Volumes/boot
$ touch ssh

Steps

// Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible).
// Tweak the makePrettyJSON_ function to customize what kind of JSON to export.
var FORMAT_ONELINE = 'One-line';
var FORMAT_MULTILINE = 'Multi-line';
var FORMAT_PRETTY = 'Pretty';
var LANGUAGE_JS = 'JavaScript';
var LANGUAGE_PYTHON = 'Python';
@ryanamaral
ryanamaral / android-backup-apk-and-datas.md
Created December 8, 2020 17:06 — forked from AnatomicJC/android-backup-apk-and-datas.md
Backup android app, data included, no root needed, with adb

Backup android app, data included, no root needed, with adb

adb is the Android CLI tool with which you can interact with your android device, from your PC

You must enable developer mode (tap 7 times on the build version in parameters) and install adb on your PC.

Fetch application APK

To get the list of your installed applications:

@ryanamaral
ryanamaral / AndroidManifest.xml
Created July 30, 2020 02:41 — forked from Sunno/AndroidManifest.xml
Set a custom contact item in android address book
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.my_app" >
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.READ_PROFILE" />
<uses-permission android:name="android.permission.WRITE_CONTACTS" />
<!-- for syncing -->
<uses-permission android:name="android.permission.READ_SYNC_SETTINGS" />
@ryanamaral
ryanamaral / README.md
Created July 5, 2020 16:55 — forked from manzoorwanijk/README.md
Google Script to bypass the blockage of Telegram Bot API from by webhost

WPTelegram Google Script

You can use this script to bypass the bans on Telegram API by different hosts. Simply send the request to this script instead of the Telegram Bot API after deploying it as a web app and allowing anonymous access.

Params

It accepts bot GET and POST requests with the following params

name type Description
@ryanamaral
ryanamaral / gzip.kts
Created June 20, 2020 23:44 — forked from sgdan/gzip.kts
Kotlin code to compress/uncompress a string with gzip
import java.io.ByteArrayOutputStream
import java.io.File
import java.nio.charset.StandardCharsets.UTF_8
import java.util.zip.GZIPInputStream
import java.util.zip.GZIPOutputStream
fun gzip(content: String): ByteArray {
val bos = ByteArrayOutputStream()
GZIPOutputStream(bos).bufferedWriter(UTF_8).use { it.write(content) }
return bos.toByteArray()
@ryanamaral
ryanamaral / GPG_made_easy.md
Last active May 15, 2020 16:00
How to use GPG to encrypt and decrypt messages

How to use GPG to encrypt and decrypt messages

Importing Someone Else’s Public Key

$ gpg --import someone-else.pub_key

Encrypting File

@ryanamaral
ryanamaral / ffmpeg-compress-mp4
Created May 6, 2020 23:58 — forked from lukehedger/ffmpeg-compress-mp4
Compress mp4 using FFMPEG
$ ffmpeg -i input.mp4 -vcodec h264 -acodec mp2 output.mp4