Skip to content

Instantly share code, notes, and snippets.

View tehmachine's full-sized avatar

tehmachine tehmachine

View GitHub Profile
<?php
/**
* Prevent Worpress from publicly displaying version number
* in <head>, rss feed, and everywhere else
*/
function wp_remove_version() {
return '';
}
add_filter('the_generator', 'wp_remove_version');

Using Italics with Vim in your Terminal

Source: https://hobo.house/2017/07/17/using-italics-with-vim-in-your-terminal/

I wanted all code, system configuration file comments or in-line replies in neomutt email italicised to stand out easier. Many terminal emulators (xterm, xfce4-terminal, iterm2) don’t support [3m and [23m designators for italics but you can use a custom terminfo to do the trick. Here’s how to get it working.

Determine if your Terminal is Supported

You can run the following command in your terminal to see if it already supports italics:

echo -e "\e[3m is this italics? \e[23m"
@tehmachine
tehmachine / vim_lua.md
Last active February 16, 2024 19:35
Compile Vim with Lua

Original issue: Shougo/neocomplete.vim#31

@JohanTan From my experience, this is how it will work (only tested on Ubuntu):

sudo apt-get install liblua5.1-dev
sudo cp -r /usr/include/lua5.1/* /usr/include/lua5.1/include/
sudo ln -s /usr/lib/x86_64-linux-gnu/liblua5.1.so /usr/local/lib/liblua.so
@tehmachine
tehmachine / nodeproxy.conf
Created August 23, 2016 21:50
Nginx configuration for Node application
server {
listen 80;
server_name CUSTOM_URL;
location / {
proxy_pass http://127.0.0.1:PORT;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
@tehmachine
tehmachine / server.js
Last active February 13, 2017 01:24
Simple Node.js server featuring Express.js
/**
* Basic Node + Express server file
* Written in ES6
*/
import express from 'express';
const app = express();
/**
* This html boilerplate can be moved in own module
@tehmachine
tehmachine / vim_build_debian
Created October 4, 2015 20:01
Build CLI Vim from source on Debian/Ubuntu
#!/bin/bash
#
# Build and install Vim on Debian/Ubuntu
# Command-line Vim only, no GUI
#
sudo apt-get remove --purge -y vim;
sudo apt-get autoremove -y;
sudo apt-get install -y liblua5.1-dev luajit lua5.1;
cd ~;
// Mobile navigation toggle button
@mixin hamburger-icon($width: 40px,
$height: 4px,
$gap: 5px,
$color: #fff,
$top: 0,
$left: 0) {
position: relative;
display: block;