snippets wordpress:ocultar barra de menu quando logado

wordpress:ocultar barra de menu quando logado

wordpress:ocultarbarra.snippets
add_filter('show_admin_bar', '__return_false');

snippets FunçãantônimaparaJQuery

FunçãantônimaparaJQuery

jquery:anon_func.snippets
(function($) {

	// $ funciona! Você pode testar com a linha abaixo se quiser.
	// console.log($);

})( jQuery );

snippets 运行异步任务(Xamarin)

运行异步任务(Xamarin)

Run_Async_Task.snippets
//Async method
public void requestInputAsync() {
      //The worker does all the work for you.
			BackgroundWorker requestInputWorkerNew = new BackgroundWorker ();
			requestInputWorkerNew.DoWork += new DoWorkEventHandler (delegate(object o, DoWorkEventArgs args) {
          //Do all the async work here but for God's sake don't mess with the UI Thread
				}
			});

			requestInputWorkerNew.RunWorkerCompleted += new RunWorkerCompletedEventHandler(
				delegate(object o, RunWorkerCompletedEventArgs args)
				{
				  //here you can even change UI elements
				});

      //Don't forget to start the worker async
			requestInputWorkerNew.RunWorkerAsync ();

		}

snippets Spring Boot计划的Cron示例

Spring Boot计划的Cron示例

springBootCron.snippets
* "0 0 * * * *" = the top of every hour of every day.
* "*/10 * * * * *" = every ten seconds.
* "0 0 8-10 * * *" = 8, 9 and 10 o'clock of every day.
* "0 0/30 8-10 * * *" = 8:00, 8:30, 9:00, 9:30 and 10 o'clock every day.
* "0 0 9-17 * * MON-FRI" = on the hour nine-to-five weekdays
* "0 0 0 25 12 ?" = every Christmas Day at midnight

snippets JS片段中基于动态文件名的名称(使用UltiSnips)

JS片段中基于动态文件名的名称(使用UltiSnips)

javascript.snippets
# Use the basename (of the file in which the snippet is invoked) as a sensible
# default for module names. Supports JSX files as well.
global !p
def module_name(name=None):
    name = name or 'ModuleName'
    s1 = re.sub('\.js(x?)$', '', name)
    return ''.join(x.title() for x in re.sub('([A-Z])', r'_\1', s1).split('_'))
endglobal

# Usage:
# In file myCleverApp.js, expands to `module.exports = MyCleverApp;`
snippet me "module.exports" b
module.exports = ${1:`!p snip.rv = module_name(snip.basename)`};$0
endsnippet

snippets 日期

日期

date.snippets
<%= Convert.ToString(DateTime.Now.Year) %>

snippets 更改所有提交的作者姓名和电子邮件

更改所有提交的作者姓名和电子邮件

changeAuthorGit.snippets
git filter-branch -f --env-filter \
"GIT_AUTHOR_NAME='Newname'; GIT_AUTHOR_EMAIL='newemail'; \
GIT_COMMITTER_NAME='committed-name'; GIT_COMMITTER_EMAIL='committed-email';" HEAD

snippets javascript:func_anon

javascript:func_anon

javascript: func_anon.snippets
var obj = (function() {
    // declarações a serem protegidas
    var a, b, c;
    // retornando um objeto construído a partir de a, b e c
    return obj;
})();

snippets Eclipse用户的SublimeText 3快捷方式

Eclipse用户的SublimeText 3快捷方式

SublimeText3_EclipseShortcuts.snippets
[
  { "keys": ["f12"], "command": "htmlprettify"},
  { "keys": ["f1"], "command": "fold" },
  { "keys": ["f2"], "command": "unfold" },
  { "keys": ["ctrl+à"], "command": "show_overlay", "args": {"overlay": "goto", "text": "@"} },
  { "keys": ["ctrl+!"], "command": "show_overlay", "args": {"overlay": "goto", "text": ":"} },
  { "keys": ["ctrl+space"], "command": "auto_complete" },
  { "keys": ["ctrl+space"], "command": "replace_completion_with_auto_complete", "context":
    [
      { "key": "last_command", "operator": "equal", "operand": "insert_best_completion" },
      { "key": "auto_complete_visible", "operator": "equal", "operand": false },
      { "key": "setting.tab_completion", "operator": "equal", "operand": true }
    ]
  },
  { "keys": ["ctrl+shift+c"], "command": "toggle_comment", "args": { "block": false } },
  { "keys": ["ctrl+shift+c"], "command": "toggle_comment", "args": { "block": true } },
  { "keys": ["ctrl+shift+f"], "command": "reindent" , "args": {"single_line": false}},
  { "keys": ["ctrl+h"], "command": "show_panel", "args": {"panel": "find_in_files"} },
  { "keys": ["ctrl+shift+s"], "command": "save_all" },
  { "keys": ["alt+up"], "command": "swap_line_up" },
  { "keys": ["alt+down"], "command": "swap_line_down" },
  { "keys": ["ctrl+alt+j"], "command": "join_lines" },
  { "keys": ["ctrl+alt+down"], "command": "duplicate_line" },
  { "keys": ["shift+ctrl+r"], "command": "show_overlay", "args": {"overlay": "goto", "show_files": true} },
  { "keys": ["shift+ctrl+f4"], "command": "close_all" },
  { "keys": ["shift+ctrl+y"], "command": "lower_case" },
  { "keys": ["shift+ctrl+x"], "command": "upper_case" }
] 

snippets 安装nodejs和npm

安装nodejs和npm

install-nodejs-npm.snippets
1. sudo add-apt-repository ppa:chris-lea/node.js
2. sudo apt-get update
3. sudo apt-get purge node nodejs nodejs-legacy npm
4. sudo apt-get install nodejs