This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"C:\Program Files\Java\jdk1.8.0_112\bin\java" -Xms512M -Xmx1024M -Xss1M -XX:+CMSClassUnloadingEnabled "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2017.2.5\lib\idea_rt.jar=54551:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2017.2.5\bin" -Dfile.encoding=windows-1252 -classpath C:\Users\ASUS\.IdeaIC2017.2\config\plugins\Scala\launcher\sbt-launch.jar xsbt.boot.Boot ~run | |
[info] Loading settings from plugins.sbt ... | |
[info] Loading project definition from C:\Users\ASUS\IdeaProjects\SbtIntellSpark2\project | |
[info] Loading settings from build.sbt ... | |
[info] Set current project to SbtIntellSpark2 (in build file:/C:/Users/ASUS/IdeaProjects/SbtIntellSpark2/) | |
[info] Running example.Main | |
[debug] Waiting for threads to exit or System.exit to be called. | |
[debug] Classpath: | |
[debug] C:\Users\ASUS\AppData\Local\Temp\sbt_f91e094a\job-1\target\be6b89a5\sbtintellspark2_2.11-0.1.jar | |
[debug] C:\Users\ASUS\AppData\Local\Temp\sbt_f91e094a\target\bf5534e6\scala-library-2.11.12.jar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Create new class, worksheet etc: | |
Ctrl + Option + N | |
Move line up | |
Command + Shift + Up Arrow | |
Copy line down | |
Command + D | |
Multiple word selection | |
Ctrl + G | |
Multiple word selection UNDO | |
Ctrl + Shift + G |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Customize Single Product Page | |
-------------------------------------------*/ | |
remove_action('woocommerce_single_product_summary', 'woocommerce_template_single_excerpt', 20 ); | |
remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_product_data_tabs', 10 ); | |
remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_upsell_display', 15 ); | |
// remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_related_products', 20 ); | |
add_action( 'woocommerce_single_product_summary', 'woocommerce_output_product_data_tabs', 20 ); | |
/* Change url of Back to Shop Button */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
You can open sublime text from command line with subl.exe and subl. The second one has a problem. If sublime text is not open already, | |
when you open sublime text with subl, the command prompt will wait until sublime text is closed. So, you cannot do anything else in | |
terminal, unless you open another terminal. This is useful in some cases. But sometimes its a pain. | |
Method 1: Open with subl.exe | |
1. Go to Control Panel > Advanced System Settings -> Advanced -> Environment Variables | |
2. Create a new system variable called SUBLIME that will point to the folder of your Sublime installation. | |
Variable Name: SUBLIME | |
Variable Value: C:\Program Files\Sublime Text 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function boot() | |
{ | |
Post::saving(function ($post) { | |
$title = $post->title; | |
$proposed_slug = strtolower(str_replace(' ', '-', $title)); | |
$existing_slug = Post::where('slug', $proposed_slug)->where('id', '<>', $post->id)->first(); | |
if(! $existing_slug) { | |
$post->slug = $proposed_slug; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// route: route must go through 'web' middleware | |
Route::group(['middleware' => ['web']], function () { | |
Route::resource('post', 'PostsController'); | |
}); | |
// view: href link with token | |
<a href="{{ action('PostsController@destroy', ['id'=>$post->id]) }}" | |
data-token="{{ csrf_token() }}" | |
data-id="{{ $post->id }}" | |
class="delete-post-link" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
[ | |
{ | |
"button": "button1", | |
"count": 1, | |
"modifiers": ["alt"], | |
"press_command": "drag_select", | |
"command": "goto_definition" | |
}, | |
{ | |
"button": "button2", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Select or Create a Database | |
use MyDatabase | |
// Create a Collection and insert document | |
db.myCollection.insert({ | |
"Name": "Placid", | |
"Age": 37, | |
"Hobbies": ["Travelling", "Movies"], | |
"myObjects": { | |
"property1" : "value1", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JavaScript resources, all free online. They're ordered in diffuculty from top to bottom. | |
http://jsforcats.com/ | |
https://www.youtube.com/playlist?list=PLeL6uTxQ-uX_5BpOb2FDNgG6SxjCs59Kv | |
https://www.youtube.com/watch?v=hQVTIJBZook | |
https://www.khanacademy.org/computing/computer-science/algorithms | |
http://speakingjs.com/es5/index.html | |
http://eloquentjavascript.net/index.html | |
http://superherojs.com/ | |
https://www.youtube.com/watch?v=8aGhZQkoFbQ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function convert(str) { | |
var ent = { | |
'&' : '&', | |
'<' : '<', | |
'>' : '>', | |
'\"': '"', | |
"\'": ''' | |
}; | |
var re = new RegExp(Object.keys(ent).join('|'), "g"); |
NewerOlder