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
| package main | |
| import ( | |
| "encoding/json" | |
| "fmt" | |
| "net/http" | |
| "os" | |
| "sort" | |
| "strconv" | |
| "strings" |
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
| require 'webrick' | |
| require 'json' | |
| server = WEBrick::HTTPServer.new Port: 9000 | |
| server.mount_proc '/' do |request, response| | |
| response.body = 'Hello World from WEBrick' | |
| end | |
| server.mount_proc '/ping' do |request, response| | |
| response.body = JSON.generate({pong: true}) |
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
| #------------------------------------------------------------------------------- | |
| # POWER ALL THE LINE! | |
| # run-shell "powerline-daemon -q" | |
| # source "$HOME/workspace/powerline/powerline/bindings/tmux/powerline.conf" | |
| # edit configuration | |
| bind e new-window -n '~/.tmux.conf' "sh -c '\${EDITOR} ~/.tmux.conf && tmux source ~/.tmux.conf && tmux display \"~/.tmux.conf sourced\"'" | |
| #------------------------------------------------------------------------------- | |
| # List of plugins |
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
| #------------------------------------------------------------------------------- | |
| # POWER ALL THE LINE! | |
| # run-shell "powerline-daemon -q" | |
| # source "$HOME/workspace/powerline/powerline/bindings/tmux/powerline.conf" | |
| # edit configuration | |
| bind e new-window -n '~/.tmux.conf' "sh -c '\${EDITOR} ~/.tmux.conf && tmux source ~/.tmux.conf && tmux display \"~/.tmux.conf sourced\"'" | |
| #------------------------------------------------------------------------------- | |
| # List of plugins |
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
| [user] | |
| name = My name | |
| email = my_github_email@example.com | |
| [alias] | |
| a = add | |
| ap = add -p | |
| can = commit -S --amend --no-edit | |
| cm = commit -S -m | |
| co = checkout |
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
| fib = Hash.new do |hash, key| | |
| if key < 2 | |
| hash[key] = key | |
| else | |
| hash[key] = hash[key-2] + hash[key-1] | |
| end | |
| end | |
| #=> {} | |
| fib[3] |
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 <stdlib.h> | |
| #include <time.h> | |
| void bubbleSort(int vet[], int len); | |
| int main() { | |
| srand(time(NULL)); | |
| int vet[10]; |
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
Show hidden characters
| { | |
| "binary_file_patterns": | |
| [ | |
| "*.jpg", | |
| "*.jpeg", | |
| "*.png", | |
| "*.gif", | |
| "*.ttf", | |
| "*.tga", | |
| "*.dds", |
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
| class Admin::ToolsController < AdminController | |
| expose :tools, ancestor: :company | |
| expose :tool, attributes: :tool_params | |
| def create | |
| if tool.save | |
| set_flash_success_and_redirect_to admin_tools_path | |
| else | |
| render :new | |
| end |
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 <stdlib.h> | |
| #include <string.h> | |
| struct Node { | |
| float value; | |
| struct Node *next; | |
| }; | |
| int isNumber(char input[]); |
NewerOlder