Skip to content

Instantly share code, notes, and snippets.

@gradosevic
gradosevic / htpasswd
Created December 10, 2016 18:29 — forked from neotohin-snippet/htpasswd
htpasswd
**INLCUDE htpasswd**
To generate .htpasswd:
htpasswd -c ./.htpasswd admin
Add this in .htaccess:
AuthUserFile /home/test/public_html/.htpasswd
AuthGroupFile /dev/null
@gradosevic
gradosevic / 00.howto_install_phantomjs.md
Created December 4, 2016 14:38 — forked from julionc/00.howto_install_phantomjs.md
How to install PhantomJS on Debian/Ubuntu

How to install PhantomJS on Ubuntu

Version: 1.9.8

Platform: x86_64

First, install or update to the latest system software.

sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev
@gradosevic
gradosevic / JVZoo.php
Created August 23, 2016 09:26 — forked from ashitvora-zz/JVZoo.php
Verify JVZoo Request
<?php namespace Alfanso\Services\Jvzoo;
class Jvzoo {
public function isValidRequest($data) {
$jvzooSecretKey = config('jvzoo.secret_key');
$receivedVerificationCode = $data['cverify'];
// remove cverify from the array since we don't use that
unset($data['cverify']);
@gradosevic
gradosevic / app.jsx
Created April 28, 2016 06:56 — forked from insin/app.jsx
React Form Handling - handleFormInputChange (Live version: http://bl.ocks.org/insin/raw/082c0d88f6290a0ea4c7/)
var INPUT_TYPES = 'color|date|datetime|datetime-local|file|month|number|password|range|search|tel|text|time|url|week'.split('|')
var App = React.createClass({
getInitialState: function() {
return {}
},
onChange: handleFormInputChange,
render: function() {
<?php
///////////////////////////////////////////////////
// STEP 1 - CREATE CLASS THAT WILL BE USED GLOBALY
///////////////////////////////////////////////////
namespace App\MyApp;
class MyApp {
public function sayHello($data = [])
{
echo "Hello World from Facade!";
}
@gradosevic
gradosevic / github_markup_code_highlighting
Created March 9, 2016 12:20
Highlight code in GitHub Markup. Example ```Cucumber
Cucumber ('*.feature')
abap ('*.abap')
ada ('*.adb', '*.ads', '*.ada')
ahk ('*.ahk', '*.ahkl')
apacheconf ('.htaccess', 'apache.conf', 'apache2.conf')
applescript ('*.applescript')
as ('*.as')
as3 ('*.as')
asy ('*.asy')
bash ('*.sh', '*.ksh', '*.bash', '*.ebuild', '*.eclass')
@gradosevic
gradosevic / React-DropDown.js
Created February 17, 2016 10:17
React DropDown component
/**
* React dropdown component
* Usage: <DropDown selected={selectedValue} items={keyValueObject} onChange={this.externalDropdownOnChangeMethod} />
*
* //For example:
* var keyValueObject = {0 =>'Value 0', 1 => 'Value 1'};
*
* //External on dropdown change method
* externalDropdownOnChangeMethod(e){
* var value = e.target.value;
@gradosevic
gradosevic / gulpfile_react.js
Last active November 24, 2022 06:27
Working gulpfile.js with gulp-babel ES6 and React
var gulp = require('gulp');
var babel = require("gulp-babel");
var sourcemaps = require('gulp-sourcemaps');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
gulp.task('default', () => {
return gulp.src('js/main.js')
.pipe(sourcemaps.init())
.pipe(babel({
@gradosevic
gradosevic / wordpress-plugin-svn-to-git.md
Created November 13, 2015 09:08 — forked from kasparsd/wordpress-plugin-svn-to-git.md
Using Git with Subversion Mirroring for WordPress Plugin Development