Skip to content

Instantly share code, notes, and snippets.

View remino's full-sized avatar

Rem remino

View GitHub Profile
For
* ES5
* ES6
* CoffeeScript
@remino
remino / README.md
Last active March 29, 2025 09:36
Nintendo Switch: Copy files from old microSD card to new microSD card

Nintendo Switch: Copy files from old microSD card to new microSD card

I'm frustrated every time I upgrade my microSD card in my Nintendo Switch, because no matter what I did before writing the switchcp.bat batch file, nothing seemed to work. Everything I'd do would eventually make a microSD card unreadable by my Switch.

After toying around with this problem for hours, below are some conclusions I've drawn. I can't take responsability for any data loss or damage to your systems. However, I do hope they can help you:

  • Don't copy your files using macOS or Linux. This is a big one. The ExFAT file system used by microSD cards of large capacity (microSDHC or microSDXC) is a proprietary file system by Microsoft. No matter how much licencing was negotiated between OS makers or how much backward engineering was done, only Windows seems to get reading and writing files on ExFAT file systems right. As a Mac user, I was determined to use macOS to do the job, until I tried with a Windows VM and saw all my prob
@remino
remino / jsbookmarklet
Created April 19, 2018 01:31
jsbookmarklet – Minify JavaScript file as browser bookmarklet
#!/bin/sh
#
# jsbookmarklet
#
# [email protected]
# 2018-04-19
#
# Minify JavaScript file using uglify then save it to a file,
# output it to the screen, or copy the output to clipboard (macOS only),
# for usage as a browser bookmarklet.
@remino
remino / pre-commit
Created April 12, 2018 04:58 — forked from samhemelryk/pre-commit
A git pre-commit hook example.
#!/bin/bash
#
# This pre-commit hook checks that you havn't left and DONOTCOMMIT tokens in
# your code when you go to commit.
#
# To use this script copy it to .git/hooks/pre-commit and make it executable.
#
# This is provided just as an example of how to use a pre-commit hook to
# catch nasties in your code.
@remino
remino / keybase.md
Last active October 28, 2016 08:22
Proof for Keybase

Keybase proof

I hereby claim:

  • I am remino on github.
  • I am remino (https://keybase.io/remino) on keybase.
  • I have a public key ASCGsV6EsemWlJoi0DjwHgGl_KooA4hNcpxtoTnnfGhEYAo

To claim this, I am signing this object:

import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
_membersMaleCount: 1,
membersCount: 5,
membersMaleCount: Ember.computed('_membersMaleCount', {
get() {
return this.get('_membersMaleCount')
},
@remino
remino / wsort.sh
Created May 20, 2016 04:38
wsort: Sort a single line of words
#!/bin/sh
# wsort
# Sort a single line of words
#
# Usage:
# wsort [words...]
# echo words | wsort
#
# Examples:
@remino
remino / json_http_headers.php
Created January 6, 2016 08:45
Return browser headers in JSON
<?php
class JsonHttpHeaders {
function headers() {
$headers = '';
foreach ($_SERVER as $name => $value) {
if (substr($name, 0, 5) == 'HTTP_') {
$header_name =
str_replace(' ', '-',
ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))));
@remino
remino / contact_form_api.php
Created November 19, 2015 14:13
Simple Contact Form API
<?php
# ContactFormAPI
#
# Simple script with PHP class to send via e-mail the details
# of a form submitted to it via HTTP POST. PHP 5.5+ required.
#
# <form action="/contact_form_api.php" method="POST" accept-charset="UTF-8">
# <input name="utf8" type="hidden" value="✓">
# <!-- ... -->