Skip to content

Instantly share code, notes, and snippets.

View lrandom's full-sized avatar
🏠
Working from home

Nguyễn Thành Luân lrandom

🏠
Working from home
View GitHub Profile
@lrandom
lrandom / content-single-product.php
Created February 2, 2022 02:14 — forked from dompascal/content-single-product.php
Woocommerce - Single Product Content Template
<?php
/**
* The template for displaying product content in the single-product.php template
*
* Override this template by copying it to yourtheme/woocommerce/content-single-product.php
*
* @author WooThemes
* @package WooCommerce/Templates
* @version 1.6.4
*/
@lrandom
lrandom / PhpStorm Keyboard Shortcuts.md
Created August 27, 2020 04:52 — forked from koomai/PhpStorm Keyboard Shortcuts.md
Frequently Used PhpStorm Keyboard Shortcuts

Note: Some of these shortcuts have been remapped for my own convenience (Preferences->Keymap). These are Mac shortcuts, just use the Windows/Linux equivalent of the Cmd/Option/Ctrl/Del keys.

####Search, Go to, Navigation ####

Cmd + P - Search file

Cmd + Shift + O - Search everywhere

(I swapped the above two recently because I use Cmd + P to search for files most of the time).

@lrandom
lrandom / cycle-metasyntactic-variables.vim
Created December 1, 2018 02:33 — forked from hail2u/cycle-metasyntactic-variables.vim
'foo', 'bar', 'baz', 'qux', 'quux', 'corge', 'grault', 'garply', 'waldo', 'fred', 'plugh', 'xyzzy', 'thud'の上で<C-a>/<C-x>すると順にサイクルしてくれるやつ。レジスター使ってる。
" Cycle metasyntactic variables
function! s:CycleMetasyntacticVariables(num)
if type(a:num) != type(0)
return
endif
let vars = ['foo', 'bar', 'baz', 'qux', 'quux', 'corge', 'grault', 'garply', 'waldo', 'fred', 'plugh', 'xyzzy', 'thud']
let cvar = expand('<cword>')
let i = index(vars, cvar)
@lrandom
lrandom / USstates_avg_latLong
Created July 7, 2018 10:43 — forked from meiqimichelle/USstates_avg_latLong
JSON of US states (full names) and their average lat/long
[
{
"state":"Alaska",
"latitude":61.3850,
"longitude":-152.2683
},
{
"state":"Alabama",
"latitude":32.7990,
"longitude":-86.8073