Use these rapid keyboard shortcuts to control the GitHub Atom text editor on macOS.
- ⌘ : Command key
- ⌃ : Control key
- ⌫ : Delete key
- ← : Left arrow key
- → : Right arrow key
- ↑ : Up arrow key
| Get-Command # Retrieves a list of all the commands available to PowerShell | |
| # (native binaries in $env:PATH + cmdlets / functions from PowerShell modules) | |
| Get-Command -Module Microsoft* # Retrieves a list of all the PowerShell commands exported from modules named Microsoft* | |
| Get-Command -Name *item # Retrieves a list of all commands (native binaries + PowerShell commands) ending in "item" | |
| Get-Help # Get all help topics | |
| Get-Help -Name about_Variables # Get help for a specific about_* topic (aka. man page) | |
| Get-Help -Name Get-Command # Get help for a specific PowerShell function | |
| Get-Help -Name Get-Command -Parameter Module # Get help for a specific parameter on a specific command |
| import Foundation | |
| import AVFoundation | |
| protocol AudioRecorder { | |
| func checkPermission(completion: ((Bool) -> Void)?) | |
| /// if url is nil audio will be stored to default url | |
| func record(to url: URL?) | |
| func stopRecording() | |
| (function(d){ | |
| var x = d.createElement("link"); | |
| var y = d.getElementsByTagName("script")[0]; | |
| x.rel = "stylesheet"; | |
| x.href = "https://fonts.googleapis.com/css?family=Raleway:400,900"; | |
| y.parentNode.insertBefore(x, y); | |
| })(document); |
| upload(files) { | |
| const config = { | |
| onUploadProgress: function(progressEvent) { | |
| var percentCompleted = Math.round((progressEvent.loaded * 100) / progressEvent.total) | |
| console.log(percentCompleted) | |
| } | |
| } | |
| let data = new FormData() | |
| data.append('file', files[0]) |
| package main | |
| import ( | |
| "fmt" | |
| "syscall" | |
| //~ "time" | |
| "unsafe" | |
| "golang.org/x/sys/windows" | |
| ) |
Use these rapid keyboard shortcuts to control the GitHub Atom text editor on macOS.
| # place this in your init.coffee | |
| atom.workspace.observeTextEditors (e) -> | |
| editor = atom.views.getView(e) | |
| clone = editor.querySelector('.wrap-guide').cloneNode() | |
| clone.style.left = (editor.getDefaultCharacterWidth() * 120) + "px" | |
| editor.querySelector('.underlayer').appendChild(clone) |
| HTTP status code symbols for Rails | |
| Thanks to Cody Fauser for this list of HTTP responce codes and their Ruby on Rails symbol mappings. | |
| Status Code Symbol | |
| 1xx Informational | |
| 100 :continue | |
| 101 :switching_protocols | |
| 102 :processing |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <script> | |
| window.MediaSource = window.MediaSource || window.WebKitMediaSource; | |
| function testTypes(types) { | |
| for (var i = 0; i < types.length; ++i) | |
| console.log("MediaSource.isTypeSupported(" + types[i] + ") : " + MediaSource.isTypeSupported(types[i])); | |
| } |
httpOnly (and secure to true if running over SSL) when setting cookies.csrf for preventing Cross-Site Request Forgery: http://expressjs.com/api.html#csrfbodyParser() and only use multipart explicitly. To avoid multiparts vulnerability to 'temp file' bloat, use the defer property and pipe() the multipart upload stream to the intended destination.