Skip to content

Instantly share code, notes, and snippets.

View remino's full-sized avatar

Rem remino

View GitHub Profile
@remino
remino / jsbookmarklet
Created April 19, 2018 01:31
jsbookmarklet – Minify JavaScript file as browser bookmarklet
#!/bin/sh
#
# jsbookmarklet
#
# remi@remino.net
# 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="✓">
# <!-- ... -->
@remino
remino / .htaccess
Created November 17, 2015 03:07 — forked from MicahChalmer/.htaccess
Scripts to set up Ruby 1.9.3 on a DreamHost shared hosting account via rbenv and ruby-build, and run a Rack app with it via FastCGI.
<IfModule mod_fastcgi.c>
AddHandler fastcgi-script .fcgi
</IfModule>
<IfModule mod_fcgid.c>
AddHandler fcgid-script .fcgi
</IfModule>
Options +FollowSymLinks +ExecCGI
RewriteEngine On
<!doctype html>
<!-- http://taylor.fausak.me/2015/01/27/ios-8-web-apps/ -->
<html>
<head>
<title>iOS 8 web app</title>
<!-- CONFIGURATION -->