start new:
tmux
start new with session name:
tmux new -s myname
| # vi: ft=dosini | |
| [user] | |
| name = Pavan Kumar Sunkara | |
| email = [email protected] | |
| username = pksunkara | |
| [core] | |
| editor = nvim | |
| whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol | |
| pager = delta | |
| [column] |
| #!/usr/bin/perl | |
| # Author: Todd Larason <[email protected]> | |
| # $XFree86: xc/programs/xterm/vttests/256colors2.pl,v 1.2 2002/03/26 01:46:43 dickey Exp $ | |
| # use the resources for colors 0-15 - usually more-or-less a | |
| # reproduction of the standard ANSI colors, but possibly more | |
| # pleasing shades | |
| # colors 16-231 are a 6x6x6 color cube | |
| for ($red = 0; $red < 6; $red++) { |
| Function Invoke-ElevatedCommand { | |
| <# | |
| .DESCRIPTION | |
| Invokes the provided script block in a new elevated (Administrator) powershell process, | |
| while retaining access to the pipeline (pipe in and out). Please note, "Write-Host" output | |
| will be LOST - only the object pipeline and errors are handled. In general, prefer | |
| "Write-Output" over "Write-Host" unless UI output is the only possible use of the information. | |
| Also see Community Extensions "Invoke-Elevated"/"su" | |
| .EXAMPLE |
| # -*- mode: ruby -*- | |
| # vi: set ft=ruby : | |
| # David Lutz's Multi VM Vagrantfile | |
| # inspired from Mark Barger's https://gist.github.com/2404910 | |
| boxes = [ | |
| { :name => :web, :role => 'web_dev', :ip => '192.168.33.1', :ssh_port => 2201, :http_fwd => 9980, :cpus =>4, :shares => true }, | |
| { :name => :data, :role => 'data_dev', :ip => '192.168.33.2', :ssh_port => 2202, :mysql_fwd => 9936, :cpus =>4 }, | |
| { :name => :railsapp, :role => 'railsapp_dev', :ip => '192.168.33.3', :ssh_port => 2203, :http_fwd => 9990, :cpus =>1} | |
| ] |
| import java.awt.datatransfer.StringSelection | |
| import java.awt.Toolkit | |
| import java.awt.datatransfer.* | |
| class ClipboardUtils{ | |
| static final Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard() | |
| static void setClipboardContents(final String contents){ | |
| clipboard.setContents(new StringSelection(contents), null) | |
| } |
| //http://groovy.codehaus.org/Using+MockFor+and+StubFor | |
| import groovy.mock.interceptor.* | |
| /*sample data class*/ | |
| class Movie { | |
| // Lots of expensive method calls, etc. | |
| } | |
| /*helper class*/ |
| javascript:q=location.href;if(document.getSelection){d=document.getSelection();}else{d='';};p=document.title;void(open('https://pinboard.in/add?later=yes&noui=yes&jump=close&tags=TAGS GO HERE&url='+encodeURIComponent(q)+'&description='+encodeURIComponent(d)+'&title='+encodeURIComponent(p),'Pinboard','toolbar=no,width=100,height=100')); | |
| // Copy and paste the above into a new bookmark. Replace "TAGS GO HERE" with your tags. Presto! |
| function ConvertTo-Boolean | |
| { | |
| param | |
| ( | |
| [Parameter(Mandatory=$false)][string] $value | |
| ) | |
| switch ($value) | |
| { | |
| "y" { return $true; } | |
| "yes" { return $true; } |