Skip to content

Instantly share code, notes, and snippets.

View Zackio's full-sized avatar

Zackary Allnutt Zackio

View GitHub Profile
@Zackio
Zackio / Javascipt: Split big arrays to smaller
Created November 25, 2013 20:38
Javascipt: Split big arrays to smaller
var splitArray = [];
while(yourArray.length) {
splitArray.push( yourArray.splice(0,10) );
}
@Zackio
Zackio / Javascipt: Insert string into url
Created November 25, 2013 20:41
Javascipt: Insert string into url
var lastSlash = url.lastIndexOf('/') +1;
var firstSect = url.substring( 0, lastSlash );
var endSect = url.substring( lastSlash, url.length );
url = firstSect + 'full_screen_preview/' + endSect;
@Zackio
Zackio / 0_reuse_code.js
Created January 1, 2014 12:10
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
<?php
/**
* Proof of concept for how to add new fields to nav_menu_item posts in the WordPress menu editor.
* @author Weston Ruter (@westonruter), X-Team
*/
add_action( 'init', array( 'XTeam_Nav_Menu_Item_Custom_Fields', 'setup' ) );
class XTeam_Nav_Menu_Item_Custom_Fields {
static $options = array(
@Zackio
Zackio / fiddle.css
Last active August 29, 2015 14:06 — forked from zalun/fiddle.css
$fullred: #ff0000;
body {
font-family: Helvetica, Verdana
}
p {
padding: 7px 10px;
}
#demo {
border: 1px solid $fullred;
}

fasdfasd fasf asdfas a sd fasdfasdfa

asfsdfadsf

fas dfasdf asd fad fasdfas

class TidyHtml5 < Formula
homepage "http://w3c.github.com/tidy-html5/"
url "https://github.com/w3c/tidy-html5/archive/master.tar.gz"
sha1 "e2ebab1cbad36350ed39470fab402643f8e35981"
version "HEAD"
patch :DATA
def install
ENV.deparallelizegm
> I had problems with ssh access. So in sourcetree use ouath and http to connect
## Setup SSH
Check if you have keys already, you want id_rsa.pub:
ls -a ~/.ssh
If it's there, copy it's contents and go to bitbucket > Manage accounts > ssh

Install MySQL

sudo apt-install mysql-server php-mysql

Start MySQL

sudo service mysql start

Install PHP

@Zackio
Zackio / test
Last active March 11, 2018 16:07
test
asdfasdf
```php
function hello() {
sdafsf
}
```