#nano javascript syntax highlighting
The existing syntax highlighting is located in /usr/share/nano/
To add a new language
sudo nano /usr/share/nano/javascript.nanorc
Put the following in the contents:
# Doxyfile 1.8.9 | |
#--------------------------------------------------------------------------- | |
# Project related configuration options | |
#--------------------------------------------------------------------------- | |
DOXYFILE_ENCODING = UTF-8 | |
PROJECT_NAME = "Cameron & Wilding Tool" | |
PROJECT_NUMBER = | |
PROJECT_BRIEF = "Drupal 7 Architecture tool" | |
PROJECT_LOGO = /Users/itarato/Desktop/logo.png |
#nano javascript syntax highlighting
The existing syntax highlighting is located in /usr/share/nano/
To add a new language
sudo nano /usr/share/nano/javascript.nanorc
Put the following in the contents:
For nginx, | |
location ~* \.(eot|ttf|woff)$ { | |
add_header Access-Control-Allow-Origin *; | |
} | |
Or better way inside virtual host location use, | |
Inside location use | |
if ($request_filename ~* ^.?/([^/]?)$) |
#!zsh | |
# __git_branch_switches | |
# _git-submodule | |
# _git-filter-branch | |
(( $+functions[_git-now] )) || | |
_git-now () { | |
local curcontext=$curcontext state line | |
declare -A opt_args |
I was tired of Chrome eating all my laptop resources so I decided to put some limit to it with cgroup.
As I was using Ubuntu 12.04 with support for cgroup, I installed the package cgroup-bin
and add the following group to the file /etc/cgconfig.conf
:
group browsers {
cpu {
# Set the relative share of CPU resources equal to 25%
cpu.shares = "256";
}
package main | |
import ( | |
"encoding/xml" | |
"fmt" | |
"io/ioutil" | |
"log" | |
"net/http" | |
) |
<?php | |
require 'vendor/autoload.php'; | |
$transport = Swift_SmtpTransport::newInstance('localhost', 25); | |
$mailer = Swift_Mailer::newInstance($transport); | |
// DKIM 用の Signer を作成する | |
$privateKey = file_get_contents('./default.private'); | |
$domainName = 'example.com'; |
#!/bin/bash | |
## cf from http://programster.blogspot.com/2014/05/ubuntu-14-desktop-install-fira-sans-and.html | |
cd /tmp | |
# install unzip just in case the user doesn't already have it. | |
if [[ `uname` = Linux ]]; then | |
sudo apt-get install unzip -y | |
wget "http://www.carrois.com/downloads/fira_4_1/FiraFonts4106.zip" |
root=$PWD | |
binary=GoogleSignInDependencies | |
signInFrameworkDir=./google_signin_sdk_4_0_1 | |
archs=(armv7 x86_64 arm64 i386) | |
duplicateClasses=(GTMLogger GTMNSDictionary+URLArguments GTMSessionFetcher GTMSessionFetcherService GTMSessionUploadFetcher) | |
hackDir=hack | |
framework=$binary.framework |
<?php | |
add_action( 'wp_enqueue_scripts', 'child_enqueue_styles' ); | |
function child_enqueue_styles() { | |
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' ); | |
} | |
add_action('woocommerce_after_checkout_validation', 'digthis_two_step_checkout_validate', 9999, 2); | |
function digthis_two_step_checkout_validate($data, $errors) { | |