Skip to content

Instantly share code, notes, and snippets.

View mauricerenck's full-sized avatar

Maurice Renck mauricerenck

View GitHub Profile
{
"ab":{
"name":"Abkhaz",
"nativeName":"аҧсуа"
},
"aa":{
"name":"Afar",
"nativeName":"Afaraf"
},
"af":{
@mauricerenck
mauricerenck / style.css
Created February 9, 2019 13:50 — forked from traumverloren/style.css
VSCode Customizations for Operator Mono, Fira Code, and Dark Candy Theme
/*
Instructions for MacOS:
- Install the fonts 'Operator Mono' & 'Fira Code'
- Install theme 'Dark Candy'
- Add the following config to the VS Code settings.json:
{
"editor.renderWhitespace": "all",
"editor.fontSize": 14,
@mauricerenck
mauricerenck / customizing-vs-code.md
Created July 9, 2018 12:07 — forked from rzvdaniel/customizing-vs-code.md
Customizing VS Code for Two Fonts.

Customizing VS Code

I followed the instructions in this blog post Multiple Fonts: Alternative to Operator Mono in VSCode, but did not see any changes made to VS Code. After digging a bit, I discovered that all the CSS class names had changed. They’re now e.g. .mtk13, .mtk16 { … }.

Gotchas

  • Ensure it’s a file URL e.g. { "vscode_custom_css.imports": [ "file:///Users/Brian/Desktop/vscode-style.css" ] }
  • If you move the location of your file and update your user settings with the new location, you will need to disable and enable custom CSS cmd+shift+p.
  • Also, anytime you change the style in your custom CSS file, you need to disable, then re-enable the extension.

For reference

@mauricerenck
mauricerenck / Response.php
Created July 4, 2018 10:38 — forked from jeffochoa/Response.php
Laravel HTTP status code
<?php
// This can be found in the Symfony\Component\HttpFoundation\Response class
const HTTP_CONTINUE = 100;
const HTTP_SWITCHING_PROTOCOLS = 101;
const HTTP_PROCESSING = 102; // RFC2518
const HTTP_OK = 200;
const HTTP_CREATED = 201;
const HTTP_ACCEPTED = 202;
@mauricerenck
mauricerenck / Update remote repo
Created February 14, 2018 09:13 — forked from mandiwise/Update remote repo
Transfer repo from Bitbucket to Github
// Reference: http://www.blackdogfoundry.com/blog/moving-repository-from-bitbucket-to-github/
// See also: http://www.paulund.co.uk/change-url-of-git-repository
$ cd $HOME/Code/repo-directory
$ git remote rename origin bitbucket
$ git remote add origin https://github.com/mandiwise/awesome-new-repo.git
$ git push origin master
$ git remote rm bitbucket
@mauricerenck
mauricerenck / Ubuntu-Compass-ruby[16.04]
Created July 13, 2017 15:53 — forked from AungMyoKyaw/Ubuntu-Compass-ruby[16.04]
Compass installation for ubuntu 16.04
[https://gist.github.com/stephou0104/233b5c99884f1d8c8b8b#file-ubuntu-compass-ruby]
sudo apt-get update
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties
sudo apt-get install libgdbm-dev libncurses5-dev automake libtool bison libffi-dev
curl -L https://get.rvm.io | bash -s stable
gpg2 --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
source ~/.rvm/scripts/rvm
echo "source ~/.rvm/scripts/rvm" >> ~/.bashrc
@mauricerenck
mauricerenck / filterbystructure.php
Created June 15, 2017 12:25 — forked from texnixe/filterbystructure.php
Kirby custom pages method to filter by values in structure field
<?php
/* Usage example:
* $filteredPages = $page('projects')->children()->visible()->filterByStructure('structureField', array(
* 'field1' => $value,
* 'field2' => $value
* ));
*/
pages::$methods['filterByStructure'] = function($pages, $field, $options) {
$filteredPages = $pages->filter(function($p)use($field, $options) {
$structureField = $p->$field()->yaml();
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>App Redirection</title>
</head>
<body>
<!-- iframe used for attempting to load a custom protocol -->
<iframe style="display:none" height="0" width="0" id="loader"></iframe>
#!/bin/bash
## Install ISPConfig3 on Ubuntu 14.04 64Bits
## Author: Nilton OS blog.linuxpro.com.br
## http://blog.linuxpro.com.br/posts/instalando-ispconfig3-no-ubuntu-1404.html
## http://www.howtoforge.com/the-perfect-server-ubuntu-14.04-nginx-bind-mysql-php-postfix-dovecot-and-ispconfig3-p2
dpkg-reconfigure dash
service apparmor stop
@mauricerenck
mauricerenck / jsonval.sh
Last active August 29, 2015 14:06 — forked from cjus/jsonval.sh
#!/bin/bash
function jsonval {
temp=`echo $json | sed 's/\\\\\//\//g' | sed 's/[{}]//g' | awk -v k="text" '{n=split($0,a,","); for (i=1; i<=n; i++) print a[i]}' | sed 's/\"\:\"/\|/g' | sed 's/[\,]/ /g' | sed 's/\"//g' | grep -w $prop`
echo ${temp##*|}
}
json=`curl -s -X GET http://twitter.com/users/show/$1.json`
prop='profile_image_url'
picurl=`jsonval`