I hereby claim:
- I am ferrielmelarpis on github.
- I am ferrielmelarpis (https://keybase.io/ferrielmelarpis) on keybase.
- I have a public key ASBq-wf7J840S5NRd3-JlalbihsgDxbdvpd-qlEgURp-xQo
To claim this, I am signing this object:
def analyze(code): | |
tokenizer = _lexemes.scanner(code) | |
tokenpairs = [] | |
while 1: | |
token = tokenizer.match() | |
if not token: | |
break | |
tokenpairs.append(tuple([token.group(token.lastindex), _tokendesc[token.lastindex - 1]])) | |
return tokenpairs |
set nocompatible | |
set hidden | |
filetype off | |
set number | |
set backspace=2 | |
set laststatus=2 | |
set ruler | |
set showcmd | |
set incsearch | |
set linebreak |
I hereby claim:
To claim this, I am signing this object:
// lib/Errors.js | |
import _ from 'lodash'; | |
export default class Errors { | |
constructor() { | |
this.errors = {}; | |
} | |
has(field) { | |
return _.has(this.errors, field); |
# Install ARCH Linux with encrypted file-system and UEFI | |
# The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description. | |
# Download the archiso image from https://www.archlinux.org/ | |
# Copy to a usb-drive | |
dd if=archlinux.img of=/dev/sdX bs=16M && sync # on linux | |
# Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration. | |
# Set swedish keymap |
This describes the steps required to configure multiple PHP versions on your development system, if you have issue using the AUR package. Normally one may install the AUR package on a custom path, .e.g, /usr/local/php
, but if you are like me having some issues with that you might want to try a custom compile.
Pay attention to step 6)
as this is where any required extensions are enabled. For this setup we generally need pdo
and mysql
extensions.
Download PHP version 5.3.13
(or any version that you are interested in) from http://php.net/releases/
Download the php53
AUR package from https://aur.archlinux.org/packages/php53/
/** | |
* Example to refresh tokens using https://github.com/auth0/node-jsonwebtoken | |
* It was requested to be introduced at as part of the jsonwebtoken library, | |
* since we feel it does not add too much value but it will add code to mantain | |
* we won't include it. | |
* | |
* I create this gist just to help those who want to auto-refresh JWTs. | |
*/ | |
const jwt = require('jwt'); |
# ~/.ssh/config | |
# Account 1 | |
Host host1 | |
HostName github.com | |
User git | |
PreferredAuthentications publickey | |
IdentityFile ~/.ssh/id_rsa_host1 | |
# Account 2 | |
Host host2 |
<?php | |
interface Displayable { | |
public function display(); | |
} | |
class ArticleCardProps { | |
protected $thumbnailComponent; |
<?php | |
// Add to existing function.php file | |
// Disable support for comments and trackbacks in post types | |
function df_disable_comments_post_types_support() { | |
$post_types = get_post_types(); | |
foreach ($post_types as $post_type) { | |
if(post_type_supports($post_type, 'comments')) { | |
remove_post_type_support($post_type, 'comments'); |