Skip to content

Instantly share code, notes, and snippets.

View n1c's full-sized avatar

Nic n1c

  • Cape Town, South Africa.
  • X @n1c
View GitHub Profile
@n1c
n1c / mxbuilder_rss.php
Created July 13, 2012 09:28
mxbuilder wordpress custom page template
<?php
/*
Template Name: mxbuilder custom rss feed
*/
$numposts = 10;
function mxbuilder_format_date($timestamp = null) {
$timestamp = ($timestamp == null) ? time() : $timestamp;
return date(DATE_RSS, $timestamp);
@n1c
n1c / gist:5926100
Last active December 19, 2015 08:29 — forked from ghouston/gist:4686573

Sublime Text – Vintage Mode Cheat Sheet

:w save file
j up one line
k down one line
h one position right
l one position left
e end of word
⇧e end of WORD
w next word
@n1c
n1c / ST3 settings
Last active June 21, 2016 09:38
Current.
{
"bold_folder_labels": true,
"caret_extra_bottom": 0,
"caret_extra_top": 0,
"caret_extra_width": 4,
"color_scheme": "Packages/Solarized Color Scheme/Solarized (light).tmTheme",
"draw_indent_guides": true,
"draw_white_space": "all",
"folder_exclude_patterns":
[
Vagrant.configure("2") do |config|
# Configure The Box
config.vm.hostname = "homestead"
config.vm.box = "laravel/homestead"
config.vm.box_url = "https://vagrantcloud.com/laravel/homestead/version/7/provider/virtualbox.box"
config.vm.network :private_network, ip: "192.168.33.3"
config.vm.provider "virtualbox" do |vb|
vb.customize ["modifyvm", :id, "--memory", "1024"]
cvar list
--------------
_autosave : cmd : : Autosave
_autosavedangerous : cmd : : AutoSaveDangerous
_bugreporter_restart : cmd : : Restarts bug reporter .dll
_record : cmd : : Record a demo incrementally.
_resetgamestats : cmd : : Erases current game stats and writes out a blank stats file
_restart : cmd : : Shutdown and restart the engine.
achievement_debug : 0 : , "cheat", "rep", "cl" : Turn on achievement debug msgs.
achievement_disable : 0 : , "cheat", "rep", "cl" : Turn off achievements.
const log = console.log;
import demofile = require("demofile");
import * as fs from "fs";
if (process.argv.length < 3) {
log("Specify the full path to a demo");
log("e.g.: ./index.js ~/test.dem");
<?php
trait Inflates
{
public function __construct(object $data)
{
$vars = get_class_vars(self::class);
foreach ($vars as $key => $value) {
$this->$key = $data->$key;
}