Skip to content

Instantly share code, notes, and snippets.

View GoranStoyanov's full-sized avatar

Goran Stoyanov GoranStoyanov

View GitHub Profile
@pamelafox
pamelafox / phonegap-photofetcher.js
Created March 23, 2012 18:32
PhoneGap Convert Photo File URI to Data URI
function getPhoto() {
navigator.camera.getPicture(onPhotoSuccess, onPhotoFail,
{quality: 70, targetWidth: 500, targetHeight: 500,
sourceType: navigator.camera.SourceType.PHOTOLIBRARY,
destinationType: navigator.camera.DestinationType.FILE_URI,
});
}
function onPhotoSuccess(imageUri) {
var $img = $('<img/>');
<?
/////////////////////
// slack2html
// by @levelsio
/////////////////////
//
/////////////////////
// WHAT DOES THIS DO?
/////////////////////
//
anonymous
anonymous / meme_generator.php
Created April 29, 2016 15:18
<?php
$start = abs(date('w')-1); //monday = 0
$start = $start . "1"; //monday = 01 (first index), friday = 41
$feed = implode(file('https://www.googleapis.com/customsearch/v1?alt=atom&cx=xxx:yyy&key=abc&q=timesheet+meme&searchType=image&start='.$start));
$xml = simplexml_load_string($feed);
$json = json_encode($xml);
$array = json_decode($json,TRUE);
$img = "";
shuffle($array["entry"]); //random selection from ten results starting from $start to avoid meme repetition
@superKalo
superKalo / Sortable.jsx
Last active August 9, 2022 09:31
How to use jQuery UI with React JS? You can use this approach to integrate almost any jQuery plugin! Full details and explanation here: http://stackoverflow.com/a/40350880/1333836
class Sortable extends React.Component {
componentDidMount() {
// Every React component has a function that exposes the
// underlying DOM node that it is wrapping. We can use that
// DOM node, pass it to jQuery and initialize the plugin.
// You'll find that many jQuery plugins follow this same pattern
// and you'll be able to pass the component DOM node to jQuery
// and call the plugin function.
@IvayloAtanasov
IvayloAtanasov / Laravel-Angular-Setup.md
Last active March 12, 2019 15:42
Laravel 5.2 + Angular 2.0 setup guide

#This guide will walk you through the steps needed to setup an empty project using the 2 frameworks into a single repository.

##You will need to have installed:

apache: >= 2.4.9
php: >= 5.5.12
composer: >= 1.2.1
node: >= 4.1.0
npm: >= 3.0.0
git: >= 1.9.5
@EdOverflow
EdOverflow / github_bugbountyhunting.md
Last active June 23, 2024 20:29
My tips for finding security issues in GitHub projects.

GitHub for Bug Bounty Hunters

GitHub repositories can disclose all sorts of potentially valuable information for bug bounty hunters. The targets do not always have to be open source for there to be issues. Organization members and their open source projects can sometimes accidentally expose information that could be used against the target company. in this article I will give you a brief overview that should help you get started targeting GitHub repositories for vulnerabilities and for general recon.

Mass Cloning

You can just do your research on github.com, but I would suggest cloning all the target's repositories so that you can run your tests locally. I would highly recommend @mazen160's GitHubCloner. Just run the script and you should be good to go.

$ python githubcloner.py --org organization -o /tmp/output
@robhrt7
robhrt7 / MySQL_5-7_macOS.md
Last active February 28, 2024 03:48 — forked from nrollr/MySQL_macOS_Sierra.md
Install MySQL 5.7 on macOS using Homebrew

This is a fork of original gist https://gist.github.com/nrollr/3f57fc15ded7dddddcc4e82fe137b58e, with slight changes on pointing to 5.7 version branch, instead of 8 (latest default of MySQL in Hombrew).

Install MySQL 5.7 on macOS

This procedure explains how to install MySQL using Homebrew on macOS (Sierra 10.12 and up)

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Note: Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.