Skip to content

Instantly share code, notes, and snippets.

View sembug's full-sized avatar
💭
Development

Roberto Nunes sembug

💭
Development
View GitHub Profile
@sembug
sembug / lazy-slider.js
Created May 18, 2012 11:31 — forked from berinhard/lazy-slider.js
Javascript slider with lazyload
$(function(){
//Lazyload function
$.fn.lazyload = function(){
var image = $(this);
if (image.attr('real-src')){
image.attr('src', image.attr('real-src'));
image.removeAttr('real-src');
}
return this;
@sembug
sembug / Link.php
Last active August 29, 2015 14:21 — forked from kpodemski/Link.php
@sembug
sembug / README.md
Created November 5, 2015 22:44 — forked from hofmannsven/README.md
My simply Git Cheatsheet
@sembug
sembug / README.md
Created November 5, 2015 22:45 — forked from hofmannsven/README.md
Simple Command Line Cheatsheet
@sembug
sembug / README.md
Created November 5, 2015 22:45 — forked from hofmannsven/README.md
This is my global Git/Bash userprofile.All files are named with a dot at the beginning (e.g. ~/.bash_profile, ~/.git-completion.bash, ~/.git-prompt.sh, ~/.gitconfig, ~/.gitignore_global)
@sembug
sembug / .gitconfig
Created December 6, 2015 00:30
My Git Config
alias.checkin=!git add -A && git commit -m
alias.up=push origin master
alias.editconfig=config --global -e
alias.history=log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
alias.l=log --oneline --decorate
alias.lga=log --graph --oneline --all --decorate
alias.s=status
alias.update=!git pull --rebase --prune $@ && git submodule update --init --recursive
alias.webui=!/python.exe /c/Users/sembug/.git-webui/release/libexec/git-core/git-webui
core.editor='c:/Program Files/Sublime Text 3/sublime_text.exe' -w
@sembug
sembug / docker_cheatsheet.md
Created March 2, 2017 18:09 — forked from jctosta/docker_cheatsheet.md
Docker - Comandos Úteis

Docker - Comandos Úteis

Containers

  • Abrir um shell em um container em execução:
    • docker exec -t -i <container_id> <shell>

Limpeza

  • Excluir containers com status equivalente a Exited:
@sembug
sembug / exjavascript.md
Last active April 25, 2021 11:54
Exercicios Javascript

Caesars Cipher

One of the simplest and most widely known ciphers is a Caesar cipher, also known as a shift cipher. In a shift cipher the meanings of the letters are shifted by some set amount. A common modern use is the ROT13 cipher, where the values of the letters are shifted by 13 places. Thus 'A' ↔ 'N', 'B' ↔ 'O' and so on. Write a function which takes a ROT13 encoded string as input and returns a decoded string. All letters will be uppercase. Do not transform any non-alphabetic character (i.e. spaces, punctuation), but do pass them on.

function convertToCesarCipher(str) {
    return str;
}
<!DOCTYPE html>
<html>
<head>
<script src="https://fb.me/react-15.1.0.js"></script>
<script src="https://fb.me/react-dom-15.1.0.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<meta charset="utf-8">
<title>JS Bin</title>
<style id="jsbin-css">
.js-add-photo-button {
@sembug
sembug / Program.cs
Last active February 27, 2020 13:55
AngularWebSocket
using SuperWebSocket;
using System;
using System.Threading;
namespace ConsoleWebSocket
{
public class Program
{
private static WebSocketServer webSocketServer;
public static void Main(string[] args)