根据启动Bash Shell的方式不同,对Shell有两种分类方式
根据Shell的启动方式不同,可以将Shell分为
| public class HelloWorld { | |
| private static int foo() { | |
| return 42; | |
| } | |
| private static void bar() { | |
| } | |
| public static void main(String[] args) throws Exception { | |
| foo(); |
| // Just before switching jobs: | |
| // Add one of these. | |
| // Preferably into the same commit where you do a large merge. | |
| // | |
| // This started as a tweet with a joke of "C++ pro-tip: #define private public", | |
| // and then it quickly escalated into more and more evil suggestions. | |
| // I've tried to capture interesting suggestions here. | |
| // | |
| // Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_, | |
| // @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant, |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| Windows Registry Editor Version 5.00 | |
| [-HKEY_CLASSES_ROOT\Directory\Background\shell\Cmder] | |
| [-HKEY_CLASSES_ROOT\Directory\shell\Cmder] |
| package net.bytebuddy; | |
| import net.bytebuddy.agent.ByteBuddyAgent; | |
| import net.bytebuddy.agent.builder.AgentBuilder; | |
| import net.bytebuddy.description.type.TypeDescription; | |
| import net.bytebuddy.dynamic.ClassFileLocator; | |
| import net.bytebuddy.dynamic.DynamicType; | |
| import net.bytebuddy.dynamic.loading.ClassInjector; | |
| import net.bytebuddy.implementation.MethodDelegation; | |
| import net.bytebuddy.implementation.bind.annotation.SuperCall; |
| git branch -m old_branch new_branch # Rename branch locally | |
| git push origin :old_branch # Delete the old branch | |
| git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote |
| # DANGER - Kills all processes for a specific database | |
| -- DECLARE @SQL varchar(max); | |
| -- SELECT @SQL = COALESCE(@SQL,'') + 'Kill ' + Convert(varchar, r.session_id) + ';' from sys.dm_exec_requests r left join sys.dm_os_waiting_tasks t | |
| -- on r.session_id = t.session_id where r.session_id >= 50 and r.session_id <> @@spid | |
| -- EXEC(@SQL) |