Skip to content

Instantly share code, notes, and snippets.

View jaderdev's full-sized avatar
🛼
Try a new thing

Jaderson Nascimento jaderdev

🛼
Try a new thing
View GitHub Profile
@jaderdev
jaderdev / README.md
Created March 9, 2017 14:19 — forked from hofmannsven/README.md
My simply Git Cheatsheet
@jaderdev
jaderdev / combo_dinamico.html
Created March 23, 2017 16:49 — forked from ografael/combo_dinamico.html
Carregar combo com JQuery - Cidades e Estados
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<script type="text/javascript" src="jquery-1.7.1.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$.getJSON('estados_cidades.json', function (data) {
@jaderdev
jaderdev / git.md
Created April 20, 2017 13:34 — forked from leocomelli/git.md
Lista de comandos úteis do GIT

#GIT

Estados

  • Modificado (modified);
  • Preparado (staged/index)
  • Consolidado (comitted);

Ajuda

describe("Mocking Ext.Ajax.request with Jasmine", function () {
var responseText,
mockResponse = {
responseText: '{"success":true,"count":1,"data":[{name: "id", "type": "int", "maxLenght": "11", "isPrimaryKey": true}]}'
};
it("should mock the Ext.Ajax.request response manipulating the spy mostRecentCall.args", function () {
spyOn(Ext.Ajax, 'request');
@jaderdev
jaderdev / comoNaoDeixarNoVaucoNoWhatsapp.js
Created October 21, 2017 01:09 — forked from callmeloureiro/comoNaoDeixarNoVaucoNoWhatsapp.js
Como não deixar no vácuo no whatsapp
/*
Hoje não deixaremos mais ninguém no vácuo no whatsapp
Para utilizar:
- Abra o web.whatsapp.com;
- Abra o console e cole o código que está no gist;
- Aguarde e verá uma mensagem sendo enviada a cada momento que alguém te enviar alguma mensagem.
Confira também como ser chato no whatsapp: https://gist.github.com/mathloureiro/4c74d60f051ed59650cc76d1da0d32da
@jaderdev
jaderdev / cors.js
Created November 7, 2017 18:08 — forked from balupton/cors.js
Acheiving CORS via a Node HTTP Server
// Create our server
var server;
server = http.createServer(function(req,res){
// Set CORS headers
res.setHeader('Access-Control-Allow-Origin', '*');
res.setHeader('Access-Control-Request-Method', '*');
res.setHeader('Access-Control-Allow-Methods', 'OPTIONS, GET');
res.setHeader('Access-Control-Allow-Headers', '*');
if ( req.method === 'OPTIONS' ) {
res.writeHead(200);
@jaderdev
jaderdev / jQuery UI Autocomplete custom CSS
Created November 17, 2017 17:53 — forked from madeinspace/jQuery UI Autocomplete custom CSS
jQuery UI Autocomplete custom CSS
/* Autocomplete
----------------------------------*/
.ui-autocomplete { position: absolute; cursor: default; }
.ui-autocomplete-loading { background: white url('images/ui-anim_basic_16x16.gif') right center no-repeat; }
/* workarounds */
* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
/* Menu
----------------------------------*/
@jaderdev
jaderdev / roman.rb
Created October 22, 2018 13:48 — forked from kanet77/roman.rb
Convert from Decimal to Roman Numerals in Ruby
class RomanNumerals
RN = {
1000 => 'M',
500 => 'D',
100 => 'C',
50 => 'L',
10 => 'X',
5 => 'V',
1 => 'I'
}
@jaderdev
jaderdev / vimdiff.md
Created April 24, 2020 01:32 — forked from mattratleph/vimdiff.md
vimdiff cheat sheet

vimdiff cheat sheet

##git mergetool

In the middle file (future merged file), you can navigate between conflicts with ]c and [c.

Choose which version you want to keep with :diffget //2 or :diffget //3 (the //2 and //3 are unique identifiers for the target/master copy and the merge/branch copy file names).

:diffupdate (to remove leftover spacing issues)

:only (once you’re done reviewing all conflicts, this shows only the middle/merged file)

@jaderdev
jaderdev / Response.php
Created May 7, 2020 11:33 — forked from jeffochoa/Response.php
Laravel HTTP status code
<?php
// This can be found in the Symfony\Component\HttpFoundation\Response class
const HTTP_CONTINUE = 100;
const HTTP_SWITCHING_PROTOCOLS = 101;
const HTTP_PROCESSING = 102; // RFC2518
const HTTP_OK = 200;
const HTTP_CREATED = 201;
const HTTP_ACCEPTED = 202;