Skip to content

Instantly share code, notes, and snippets.

View kidchenko's full-sized avatar

Jose Barbosa kidchenko

View GitHub Profile
@kidchenko
kidchenko / git-reset-author.sh
Created July 6, 2021 17:43 — forked from bgromov/git-reset-author.sh
Git: reset author for ALL commits
#!/bin/sh
# Credits: http://stackoverflow.com/a/750191
git filter-branch -f --env-filter "
GIT_AUTHOR_NAME='Newname'
GIT_AUTHOR_EMAIL='new@email'
GIT_COMMITTER_NAME='Newname'
GIT_COMMITTER_EMAIL='new@email'
" HEAD
@kidchenko
kidchenko / Mapper.cs
Created April 25, 2018 03:07 — forked from imranbaloch/Mapper.cs
Simple Mapper
public static class Mapper
{
public static T2 Map<T1, T2>(T1 t1)
{
var json = JsonConvert.SerializeObject(t1);
return JsonConvert.DeserializeObject<T2>(json);
}
}
@kidchenko
kidchenko / gulpfile.js
Last active September 5, 2016 06:57 — forked from Sigmus/gulpfile.js
gulpfile.js with browserify, reactify, watchify and gulp-notify.
var source = require('vinyl-source-stream');
var gulp = require('gulp');
var gutil = require('gulp-util');
var browserify = require('browserify');
var reactify = require('reactify');
var watchify = require('watchify');
var notify = require("gulp-notify");
var scriptsDir = './scripts';
var buildDir = './build';
@kidchenko
kidchenko / package.json
Created September 5, 2016 00:13
using `npm run` to build and watch with less and browserify
{
"name": "my-app",
"version": "0.0.0",
"dependencies": {
"browserify": "~2.36.1",
"less": "~1.5.1"
},
"devDependencies": {
"watchify": "~0.4.1",
"catw": "~0.2.0"
@kidchenko
kidchenko / npm.cmd
Created July 27, 2016 01:51 — forked from giggio/npm.cmd
Alternative npm.cmd for VS201X node tools integration. Caches npm ls -g result until a different npm command is issued.
@ECHO OFF
SETLOCAL
SET "NODE_EXE=%~dp0\node.exe"
IF NOT EXIST "%NODE_EXE%" (
SET "NODE_EXE=node"
)
SET "NPM_CLI_JS=%~dp0\node_modules\npm\bin\npm-cli.js"
Marcador: Significado
TODO: Elementos ainda não implementados
FIXME: Código que sabidamente apresenta problemas
HACK: Solução admitante deselegante para um problema
XXX: Perigo! Há um grande problema aqui
$.ajaxSettings.traditional = true; // <-- Important
$('#btn').click(function () {
var array = [];
var url = '/Controller/Action';
$.post(url, { array : array });
});
});
@kidchenko
kidchenko / 0_reuse_code.js
Created November 5, 2013 15:11
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console