Skip to content

Instantly share code, notes, and snippets.

View brayoh's full-sized avatar
🎯
Focusing

Brian Njenga brayoh

🎯
Focusing
View GitHub Profile
@brayoh
brayoh / gist:0aade2ed3bfd1a747ac98fc8adebe92f
Created April 20, 2016 06:28 — forked from Goddchen/gist:5600345
Gradle build file for Eclipse projects in Android Studio (as created by the Eclipse File->Export feature)
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.4'
}
}
apply plugin: 'android'
@brayoh
brayoh / Sublime Text 3 Build 3103 License Key - CRACK
Created April 27, 2016 08:56
Sublime Text 3 Build 3103 License Key - CRACK
I use the first
—– BEGIN LICENSE —–
Michael Barnes
Single User License
EA7E-821385
8A353C41 872A0D5C DF9B2950 AFF6F667
C458EA6D 8EA3C286 98D1D650 131A97AB
AA919AEC EF20E143 B361B1E7 4C8B7F04
@brayoh
brayoh / install_php7_lamp.sh
Created April 27, 2016 09:50 — forked from barbotkin/install_php7_lamp.sh
Install php7 in Linux (Mint/Ubuntu) LAMP Server
#! /bin/bash
# PHP 7 Initial Compile (Install php7 Linux (Mint/Ubuntu) LAMP) ##
# Author: Roman Barbotkin
# Fixed error and simplified, I tested for Linux Mint 7.3.
# Install: just run this file, it will do everything for you :)
# If make error uncoments 2 line.
#sudo apt-get purge make
#sudo apt-get install make
@brayoh
brayoh / mongoose_pagination.js
Created May 3, 2016 05:06
mongoose node .js query pagination
#how to paginate results in mongoose queries
MyModel.find(query, fields, { skip: 10, limit: 5 }, function(err, results) { ... });
@brayoh
brayoh / gist:ff3759a2ce41601569d1a826d2441b9d
Created May 4, 2016 12:23 — forked from jesusprubio/gist:8f092af4ca252e252eab
Proposal: A Node.js penetration test framework

Proposal: Node.js penetration test framework

Hi guys! Since I started to write Bluebox-ng I've been tracking the different security projects I found written in Node.js. Now we've published the first stable version we think it's the right moment to speak among us (and, of course, everyone interested in it :).

Why?

  • I think we're rewriting the same stuff in our respective projects again and again. For example, almost any tool supports IPv6 because the functions we need are still not present in the Node core and the libraries I found (IMHO) were not enough.
  • There're different projects implementing exactly the same thing, ie: port scanners.
  • We're working in a too new environment, so we need to make it together.
@brayoh
brayoh / xhr_upload.js
Last active May 4, 2016 21:52
image upload using xhr request
$(function(){
'use strict';
$('#your-form').submit(function(ev){
ev.preventDefault();
// Create a new FormData object.
var formData = new FormData();
var files = document.getElementById('your-file-input').files;
@brayoh
brayoh / meta-tags.md
Created May 28, 2016 06:08 — forked from kevinSuttle/meta-tags.md
List of Usable HTML Meta and Link Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta charset='UTF-8'>
<meta name='keywords' content='your, tags'>
<meta name='description' content='150 words'>
<meta name='subject' content='your website's subject'>
<meta name='copyright' content='company name'>
@brayoh
brayoh / tmux-cheatsheet.markdown
Created December 1, 2016 09:56 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname

What does this PR do?

Description of Task to be completed?

How should this be manually tested?

Any background context you want to provide?

What are the relevant pivotal tracker stories?

@brayoh
brayoh / bump_version.sh
Created August 31, 2017 05:07
Script for semantic versioning and tagging your app releases in git
#!/bin/bash
# works with a file called VERSION in the current directory,
# the contents of which should be a semantic version number
# such as "1.2.3"
# this script will display the current version, automatically
# suggest a "minor" version update, and ask for input to use
# the suggestion, or a newly entered value.