Skip to content

Instantly share code, notes, and snippets.

View sirkitree's full-sized avatar

Jerad Bitner sirkitree

View GitHub Profile

Keybase proof

I hereby claim:

  • I am sirkitree on github.
  • I am sirkitree (https://keybase.io/sirkitree) on keybase.
  • I have a public key ASCoPSaiJoosp3CBBavUVtR3hDGYjcUqUGcwlQFEgHfdtgo

To claim this, I am signing this object:

@sirkitree
sirkitree / node.js
Last active December 24, 2018 15:31
Parse a PHP file with Node.js and convert an array defined in the PHP script into a JSON object which the Node app can use.
var runner = require('child_process');
runner.exec(
'php -r \'include("settings.php"); print json_encode($databases);\'',
function (err, stdout, stderr) {
var connection = JSON.parse(stdout).default.default;
console.log(connection.database);
// result botdb
}
@sirkitree
sirkitree / indexer.js
Created January 15, 2013 03:23
Simple indexing script. Run with node indexer > output.file
var Crawler = require("simplecrawler").Crawler;
// var myCrawler = new Crawler("jeradbitner.com");
var myCrawler = new Crawler("www.grammy.com");
// myCrawler.domain = "www.grammy.com";
myCrawler.supportedMimeTypes = [
/^text\//i
];
myCrawler.scanSubdomains = false;
myCrawler.ignoreWWWDomain = true;
// myCrawler.discoverResources = false;
vagrant up
Bringing machine 'ibm' up with 'virtualbox' provider...
==> ibm: Checking if box 'geerlingguy/ubuntu1404' is up to date...
==> ibm: Clearing any previously set forwarded ports...
==> ibm: Clearing any previously set network interfaces...
==> ibm: Preparing network interfaces based on configuration...
ibm: Adapter 1: nat
ibm: Adapter 2: hostonly
==> ibm: Forwarding ports...
ibm: 22 (guest) => 2222 (host) (adapter 1)
@sirkitree
sirkitree / lamp.md
Created July 3, 2017 15:09
installing lamp on windows 10 bash

Install LAMP

  • sudo apt-get install apache2 php5 libapache2-mod-php5 mariadb-server php5-mysql php5-cli php5-gd

change port

Windows is using 80 already

  • vim /etc/apache2/ports.conf
  • change 80 to 8080

start services

  • sudo service apache2 start
@sirkitree
sirkitree / contenta_error-1.md
Last active July 3, 2017 15:07
Contenta Errors
-----------------------------------------------                                                                                                                         
 Installing Contenta CMS for local usage                                                                                                                                
-----------------------------------------------                                                                                                                         
 EXECUTING  /tmp/test_contenta_jsonapi/bin/drush si contenta_jsonapi --db-url=sqlite://sites/default/files/.ht.sqlite --account-pass=test -y                            
                                                                                                                                                                        
                                                                                                                                                                        
You ar
 npm run serve-js
> aframe-react-boilerplate@1.0.0 serve-js /Users/sirkitree/repos/aframe-react-boilerplate
> webpack-dev-server --content-base src --progress --watch --history-api-fallback --inline --hot --host 0.0.0.0
70% 1/1 build moduleshttp://0.0.0.0:8080/
webpack result is served from /
content is served from /Users/sirkitree/repos/aframe-react-boilerplate/src
404s will fallback to /index.html
Hash: c4f3d393b72c71d0eef0
@sirkitree
sirkitree / memcached
Created July 27, 2010 20:23
memcached
#! /bin/sh
#
PORT=11211
USER=nobody
MAXCONN=1024
OPTIONS=""
DAEMON=/usr/bin/memcached
RETVAL=0
@sirkitree
sirkitree / emoji.rb
Created July 10, 2013 14:14
Random Emoji command
ruby -e "print ':'+%w{zero one 109 two three four five six seven eight 8ball nine a ab airplane alien ambulance angel anger angry apple aquarius aries arrow_backward arrow_down arrow_forward arrow_left arrow_lower_left arrow_lower_right arrow_right arrow_up arrow_upper_left arrow_upper_right art astonished atm b baby baby_chick baby_symbol balloon bamboo bank barber baseball basketball bath bear beer beers beginner bell bento bike bikini bird birthday black_square blue_car blue_heart blush boar boat bomb book boot bouquet bow bowtie boy bread briefcase broken_heart bug bulb bullettrain_front bullettrain_side bus busstop cactus cake calling camel camera cancer capricorn car cat cd chart checkered_flag cherry_blossom chicken christmas_tree church cinema city_sunrise city_sunset clap clapper clock1 clock10 clock11 clock12 clock2 clock3 clock4 clock5 clock6 clock7 clock8 clock9 closed_umbrella cloud clubs cn cocktail coffee cold_sweat computer confounded congratulations construction construction_worker convenienc
@sirkitree
sirkitree / sct.info
Last active December 16, 2015 08:09
Image Style Scale and Crop from the top
; $Id$
name = Image Style Scale and Crop from the top
description = Image style to scale an image and crop it from the top.
core = 7.x
package = ImageStyles