Skip to content

Instantly share code, notes, and snippets.

View nicekiwi's full-sized avatar
🍳
Living brunch to brunch.

Ezra nicekiwi

🍳
Living brunch to brunch.
View GitHub Profile
@p3lim
p3lim / formatted.md
Last active January 8, 2022 06:19
Planetside2 - Formatted API dumps

Servers - census

id name
1 Connery
10 Miller
13 Cobalt
17 Emerald
25 Briggs
@hotfix31
hotfix31 / jquery.getPath.js
Created May 28, 2014 08:55
GetPath for jQuery : Get a unique path for one element
jQuery.fn.getPath = function () {
if (this.length != 1) throw 'Requires one element.';
var path, node = this;
while (node.length) {
var realNode = node[0], name = realNode.localName;
if (!name) break;
name = name.toLowerCase();
var parent = node.parent();
@jcalonso
jcalonso / bluehostDBBackup
Created May 1, 2014 20:47
Backup databases from bluehost
#!/bin/sh
LOGFILE=/tmp/bluehost_backup.log
EXPECTED_ARGUMENTS=3
exec 6>&1 # Link file descriptor #6 with the standard output
exec > $LOGFILE # stdout sent to $LOGFILE
#Check script arguments
if [ $# -ne $EXPECTED_ARGUMENTS ]
then
echo "No arguments supplied."
@mishak87
mishak87 / ip.conf
Created April 23, 2014 01:39
Nginx: Support only requests with Host header (disable access via bare IP)
# this file blocks ip requests - only request with Host are supported
server {
listen 80 default_server;
listen 443 default_server ssl;
server_name _;
return 444;
}
<?php
$output = '';
SSH::run($commands, function($line) use (&$output)
{
$output .= $line;
});
echo $output;
@magicznyleszek
magicznyleszek / jekyll-and-liquid.md
Last active January 25, 2025 20:12
Jekyll & Liquid Cheatsheet

Jekyll & Liquid Cheatsheet

A list of the most common functionalities in Jekyll (Liquid). You can use Jekyll with GitHub Pages, just make sure you are using the proper version.

Running

Running a local server for testing purposes:

@mitchellvanw
mitchellvanw / laravel-application-creater
Last active December 30, 2015 11:09
Install the Laravel Application Creator globally on your *nix machine.
# Installation
curl -o laravel.phar http://laravel.com/laravel.phar
chmod 755 laravel.phar
mv laravel.phar /usr/local/bin/laravel
# Usage
laravel new <application_name>
@theninthnode
theninthnode / Angular canonical tags
Created August 9, 2013 08:36
Little snippet to set canonical links in AngularJS. Note. this will only work with crawlers if you implement some sort of interceptor and return fully rendered html/js to the crawler i.e. using PhantomJS
$rootScope.$watch('canonical', function(newVal){
if(newVal != '') {
var link = angular.element('<link>');
link.attr('rel', 'canonical');
link.attr('href', newVal);
angular.element('head').append(link);
}
})
@maxmanders
maxmanders / Vagrantfile
Last active December 8, 2016 14:12
Vagrant 1.1 with host-only and bridged networking
Vagrant.configure("2") do |config|
ip_address = "192.168.56.1"
config.vm.box = "ubuntu-12.04.2-server-amd64"
config.vm.hostname = "chef-server.local"
config.ssh.timeout = 30
config.vm.provider :virtualbox do |vbox|
vbox.customize [ "modifyvm", :id, "--memory", 1024 ]
@danielcosta
danielcosta / integrating_jira_with_sourcetree.md
Last active November 7, 2023 21:03
Learn how to integrate your SourceTree repositories with JIRA

Integrating JIRA with SourceTree

Overview

You will learn how to link your JIRA tasks directly on SourceTree

Step by step

1. Setting