Skip to content

Instantly share code, notes, and snippets.

View yeomann's full-sized avatar
Hard work yields success

Danish yeomann

Hard work yields success
View GitHub Profile
@yeomann
yeomann / README.md
Created July 26, 2018 12:07 — forked from MoOx/README.md
How to keep in sync your Git repos on GitHub, GitLab & Bitbucket easily
@yeomann
yeomann / React Native Clear Cache
Last active July 4, 2018 19:45 — forked from jarretmoses/React Native Clear Cache
Clearing the Cache of your React Native Project
RN < 0.50 - watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache
RN >= 0.50 - watchman watch-del-all && rm -rf $TMPDIR/react-native-packager-cache-* && rm -rf $TMPDIR/metro-bundler-cache-* && rm -rf node_modules/ && npm cache clean --force && npm install && npm start -- --reset-cache
npm >= 5 - watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache verify && npm install && npm start -- --reset-cache
Windows - del %appdata%\Temp\react-native-* & cd android & gradlew clean & cd .. & del node_modules/ & npm cache clean --force & npm install & npm start -- --reset-cache
@yeomann
yeomann / .gitignore
Created January 30, 2018 19:56 — forked from christianchristensen/.gitignore
Simple PHP Graph data-structure.
/vendor
@yeomann
yeomann / autocomplete.php
Created June 14, 2017 12:26 — forked from imranismail/autocomplete.php
Laravel And JqueryUI's Autocomplete Plugin
//SearchController.php
public function autocomplete(){
$term = Input::get('term');
$results = array();
$queries = DB::table('users')
->where('first_name', 'LIKE', '%'.$term.'%')
->orWhere('last_name', 'LIKE', '%'.$term.'%')
->take(5)->get();
@yeomann
yeomann / restapi.txt
Created April 13, 2017 16:56 — forked from chrismccoy/restapi.txt
WordPress REST API Resources
Demo mobile app using WordPress REST API
https://github.com/scottopolis/wp-rest-api-demo
Expose Post Formats in WP REST API
https://github.com/kucrut/wp-bridge-post-formats
WP REST API endpoint for menus
https://github.com/kucrut/wp-bridge-menus
Powerful framework plugin for turning your WordPress theme into an isomorphic JavaScript application using the REST API
@yeomann
yeomann / .babelrc
Created April 9, 2017 10:17 — forked from JamieMason/.babelrc
Tree-Shaking with Babel 6, Webpack 2, and React.
{
"presets": [
["es2015", {
"es2015": {
"loose": true,
"modules": false
}
}], "react"
]
}
@yeomann
yeomann / gulpfile.js
Created February 19, 2017 22:46 — forked from danharper/gulpfile.js
New ES6 project with Babel, Browserify & Gulp
var gulp = require('gulp');
var sourcemaps = require('gulp-sourcemaps');
var source = require('vinyl-source-stream');
var buffer = require('vinyl-buffer');
var browserify = require('browserify');
var watchify = require('watchify');
var babel = require('babelify');
function compile(watch) {
var bundler = watchify(browserify('./src/index.js', { debug: true }).transform(babel));
@yeomann
yeomann / angularjs.es6.filter.js
Created February 15, 2017 14:55 — forked from anein/angularjs.es6.filter.js
Creating an angularjs filter using ES6
class MyFilter {
static filter( value ){
return value.toLowerCase();
}
}
export default MyFilter.filter;
@yeomann
yeomann / plugin-settings.php
Created February 1, 2017 17:14 — forked from annalinneajohansson/plugin-settings.php
A base for a WordPress plugin settings page, using the Settings API #add_options_page #add_action #admin_init #register_setting #add_settings_section
<?php
# http://kovshenin.com/2012/the-wordpress-settings-api/
# http://codex.wordpress.org/Settings_API
add_action( 'admin_menu', 'my_admin_menu' );
function my_admin_menu() {
add_options_page( __('My Plugin Options', 'textdomain' ), __('My Plugin Options', 'textdomain' ), 'manage_options', 'my-plugin', 'my_options_page' );
}
add_action( 'admin_init', 'my_admin_init' );