Test-Path $Profile
New-Item –Path $Profile –Type File –Force
code $profile
| let cat; | |
| let loadCat = () => { | |
| let img = new Image(); | |
| img.style.width = '100px'; | |
| img.style.height = '100px'; | |
| img.addEventListener('load', () => { | |
| cat = img; | |
| }); | |
| img.src = 'cat.jpg'; | |
| document.getElementsByTagName('body')[0].appendChild(img); |
| public foo(): Observable<any> { | |
| if (this.connection) { | |
| const subject: Subject<any> = new Subject<any>(); | |
| this.connection.on('', (bar): void => { | |
| subject.next(bar); | |
| }); | |
| this.connection.onclose((err?: Error): void => { | |
| if (err) { |
| cd ~/projects/da/da_ui | |
| $branches = (git branch) | Out-String | |
| $branches = $branches.Split([Environment]::NewLine) | |
| for ($num = 0; $num -lt $branches.Count; $num++) { | |
| $branch = $branches[$num] -replace '\s','' | |
| if (![string]::IsNullOrEmpty($branch) -and !($branch -match "Release_Candidate") -and !($branch -match "master")) { | |
| $answer = read-host "delete this branch? ${branch} | |
| ${[Environment]::NewLine} y == delete locally |
| # pop one commit from remote master | |
| # '+' pushes with force | |
| git push origin +HEAD^:master |
| using System; | |
| public class Program | |
| { | |
| public static void Main() | |
| { | |
| bool foo = false; | |
| Console.WriteLine("foo 1: "); | |
| Console.WriteLine(foo); | |
| changeFoo(ref foo); |