Skip to content

Instantly share code, notes, and snippets.

@anestan
anestan / Sublime-stuffs.txt
Created August 9, 2017 15:43 — forked from vishalbasnet23/Sublime-stuffs.txt
Install PHPCS with WordPress Coding Standard with Sublime Text 3
1. cmd+shift+p
2. Type phpcs and install it
3. Preferences > Package Settings > Php Code Sniffer > User settings
@anestan
anestan / phpcs-sublime.md
Created August 9, 2017 15:34 — forked from GaryJones/notes.md
Add PHPCS + WPCS to Sublime Text 3

Install PHP_CodeSniffer (PHPCS) via git

You can use the .phar for PHPCS, but it's easier to pull the repo down from git to then choose what version to use.

cd ~
mkdir -p code
cd code
git clone https://github.com/squizlabs/PHP_CodeSniffer.git phpcs
@anestan
anestan / laravel-ajax.php
Created August 4, 2017 02:08 — forked from davestewart/laravel-ajax.php
A lightweight example to get Laravel 5 users up to speed with jQuery AJAX
/**
* Laravel / jQuery AJAX code example
* See conversation here: http://laravel.io/forum/04-29-2015-people-asking-about-jquery-ajax
*
* Drop this code into your App/Http/routes.php file, and go to /ajax/view in your browser
* Be sure to bring up the JavaScript console by pressing F12.
*/
// This is your View AJAX route - load this in your browser
Route::get('/ajax/view', function () {
@anestan
anestan / laraveltricks.md
Last active July 19, 2017 02:31
Laravel Tricks

Install font awesome

Run on terminal / cmd

npm install font-awesome --save-dev

Add this to app.css

@import "node_modules/font-awesome/scss/font-awesome.scss";
@anestan
anestan / learnlaravel.md
Last active July 5, 2017 10:00
Belajar Laravel

ini namanya RESTful routing

Route::get();
Route::post();
Route::put();
Route::patch();
Route::delete();
Route::any();
@anestan
anestan / footer.blade.php
Created July 4, 2017 06:13 — forked from janikvonrotz/footer.blade.php
Laravel default templates #Laravel
@anestan
anestan / install laravel di windows.md
Last active December 19, 2018 05:15
install laravel di windows
@anestan
anestan / typekit.php
Created March 31, 2017 09:29
add typekit font
/**
* TypeKit Fonts
*
* @since Theme 1.0
*/
function theme_typekit() {
wp_enqueue_script( 'theme_typekit', '//use.typekit.net/xxxxxxx.js');
}
add_action( 'wp_enqueue_scripts', 'theme_typekit' );
@anestan
anestan / removeclass.php
Created February 28, 2017 09:13
remove class in body class wp
// Removes no-sidebar class from the body_class array on Panel Pages.
add_filter('body_class', function (array $classes) {
if ( is_page_template('panel-page.php') ) {
unset( $classes[array_search('no-sidebar', $classes)] );
}
return $classes;
}, 12 );