This is a short document describing the preferred coding style for the linux kernel. Coding style is very personal, and I won't force my views on anybody, but this is what goes for anything that I have to be able to maintain, and I'd prefer it for most other things too. Please at least consider the points made here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <unistd.h> | |
#include <sys/socket.h> | |
#include <msgpack.h> | |
/* | |
* $ NVIM_LISTEN_ADDRESS=127.0.0.1:8888 nvim | |
* | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Version":"2012-10-17", | |
"Statement":[{ | |
"Sid":"PublicReadGetObject", | |
"Effect":"Allow", | |
"Principal": "*", | |
"Action":["s3:GetObject"], | |
"Resource":["arn:aws:s3:::example.com/*" | |
] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Simple, ad-hoc script to quickly bootstrap a fresh Vim install. | |
echo -n "This will overwrite your .vimrc and plugins. Do you wish to continue [y/N]? " | |
read answer | |
if ! echo "$answer" | grep -iq "^y"; then | |
exit | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
execute pathogen#infect() | |
"execute pathogen#helptags() | |
" Suggested Pathogen plugins | |
" https://github.com/tpope/vim-commentary.git | |
" https://github.com/tpope/vim-obsession.git | |
" https://github.com/tpope/vim-sensible.git | |
" https://github.com/tpope/vim-markdown.git | |
" https://github.com/itchyny/lightline.vim | |
" https://github.com/terryma/vim-multiple-cursors.git | |
" https://github.com/mhinz/vim-signify |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get the network adapter object | |
$adapter = Get-WmiObject -Class Win32_NetworkAdapter | | |
Where-Object {$_.Name -eq "TP-LINK Wireless USB Adapter"} | |
# Disable it | |
Write-Host -nonew "Disabling $($adapter.Name)... "; | |
$result = $adapter.Disable() | |
if ($result.ReturnValue -eq -0) { | |
Write-Host "Success."; | |
} else { |
NewerOlder