This file contains 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 <sys/types.h> | |
#include <sys/socket.h> | |
#include <netinet/in.h> | |
#include <netdb.h> | |
#include <stdio.h> | |
int main(void) | |
{ | |
struct sockaddr_in *server; | |
server->sin_family = AF_INET; |
This file contains 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
void Server::incomingConnection(int socketDescriptor) | |
{ | |
QSslSocket *socket = new QSslSocket(this); | |
socket->setProtocol(QSsl::SslV3); // TODO: Or other protocols, like tls, sslv2? Research... | |
// For now these files should be reside in the same folder as the application | |
socket->setPrivateKey("server.key"); // $ openssl genrsa -out server.key 2048 | |
socket->setLocalCertificate("server.crt"); // $ openssl req -new -x509 -key server.key -out server.crt -days 1095 | |
if (socket->setSocketDescriptor(socketDescriptor)) { |
This file contains 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
{nickname} = KD.whoami().profile | |
path = "/Users/#{nickname}/example.txt" | |
file = FSHelper.createFileFromPath path | |
appManager.openFileWithApplication file, 'Ace' |
This file contains 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
Show hidden characters
// Format: "http://user:pass@proxy:port" | |
"https_proxy": "", | |
// Enterprise support | |
"enterprise": false, | |
// Github URL | |
// Default: Leave empty if you want to use GitHub.com | |
// Example: https://github.domain.com | |
"url": "", |
This file contains 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
set autoindent " Copy indent from current line when starting a new line. | |
set backspace=indent,eol,start " makes backspace key more powerful. | |
set showmatch " do not show matching brackets by flickering | |
set incsearch " shows the match while typing | |
set hlsearch " highlight found searches | |
set smartcase " Turn of smart searching | |
set ignorecase " Search incase sensitive | |
set ruler " |
This file contains 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
x := [5]float64{ 98, 93, 77, 82, 83 } | |
// the notation ... specifies an array length equal to the maximum element index plus one. | |
a := [...]float64{ 98, 93, 77, 82, 83 } | |
var total float64 = 0 | |
//for i := 0; i < len(x); i++ { | |
//total += x[i] |
This file contains 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
export AMPQ_URL=ampq://localhost/ | |
#rbenv | |
export PATH="$HOME/.rbenv/bin:$PATH" | |
eval "$(rbenv init -)" | |
#Disable Autcorrectur | |
unsetopt correct_all |
This file contains 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
[ | |
{ "keys": ["ctrl+shift+r"], "command": "expand_selection_to_paragraph" }, | |
{ "keys": ["ctrl+u"], "command": "scroll_lines", "args": {"amount": 30.0}, "context": [{ "key": "setting.command_mode" }]}, | |
{ "keys": ["ctrl+d"], "command": "scroll_lines", "args": {"amount": -30.0}, "context": [{"key": "setting.command_mode"}]}, | |
{ "keys": ["j", "k"], "command": "exit_insert_mode", | |
"context": | |
[ | |
{ "key": "setting.command_mode", "operand": false }, | |
{ "key": "setting.is_widget", "operand": false } | |
] |
This file contains 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
{ | |
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme", | |
"find_selected_text": true, | |
"folder_exclude_patterns": | |
[ | |
".svn", | |
".git", | |
".hg", | |
"CVS", | |
".build" |
This file contains 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
package main | |
import ( | |
"fmt" | |
zmq "github.com/alecthomas/gozmq" | |
) | |
func main() { | |
context, _ := zmq.NewContext() | |
socket, _ := context.NewSocket(zmq.REQ) |