Skip to content

Instantly share code, notes, and snippets.

View codingwithbatista's full-sized avatar
💻
Programming

Paulo Batista codingwithbatista

💻
Programming
View GitHub Profile
@alopresto
alopresto / gpg_git_signing.md
Last active December 8, 2024 15:44
Steps to enable GPG signing of git commits.

If anyone is interested in setting up their system to automatically (or manually) sign their git commits with their GPG key, here are the steps:

  1. Generate and add your key to GitHub
  2. $ git config --global commit.gpgsign true ([OPTIONAL] every commit will now be signed)
  3. $ git config --global user.signingkey ABCDEF01 (where ABCDEF01 is the fingerprint of the key to use)
  4. $ git config --global alias.logs "log --show-signature" (now available as $ git logs)
  5. $ git config --global alias.cis "commit -S" (optional if global signing is false)
  6. $ echo "Some content" >> example.txt
  7. $ git add example.txt
  8. $ git cis -m "This commit is signed by a GPG key." (regular commit will work if global signing is enabled)
@codingwithbatista
codingwithbatista / TAUTIC Accelerometer break out demo code.
Created March 12, 2016 15:59 — forked from TAUTIC/TAUTIC Accelerometer break out demo code.
Sample code for the MMA7660FCR1 Accelerometer Breakout Board
// MMA7660FC Basic demo by Addidis
// Released under the Creative Commons Attribution-ShareAlike License (3.0)
// http://creativecommons.org/licenses/by-sa/3.0/us/
// 10/24/11
// HW : Tautic accelerometer board +4.7k pull ups on sda scl , uno32, led +330 resistor
// SCL -->A5
// SDA -->A4
// INT -->D7
// gnd -->gnd
// vdd -->3.3v NOTE 3.3v!
@guenodz
guenodz / TFIDFCalculator.java
Created February 17, 2015 11:35
a simple implementation of TF-IDF algorithm in Java.
package com.guendouz.textclustering.preprocessing;
import java.util.Arrays;
import java.util.List;
/**
* @author Mohamed Guendouz
*/
public class TFIDFCalculator {
/**
@dedunumax
dedunumax / .gitignore Java
Last active April 23, 2025 15:08
A complete .gitignore file for Java.
##############################
## Java
##############################
.mtj.tmp/
*.class
*.jar
*.war
*.ear
*.nar
hs_err_pid*
@egel
egel / auto-remove-sublime-license-popup
Last active April 14, 2025 09:58
Auto-remove Sublime's license popup
#!/usr/bin/python
# -*- coding: utf-8 -*-
import sublime_plugin
import subprocess
from time import sleep
import sys
cl = lambda line: subprocess.Popen(line, shell=True, stdout=subprocess.PIPE).communicate()[0].strip()
log = lambda message: sys.stderr.write("Log: %s\n" % message)
@jbranchaud
jbranchaud / CSVtoLaTeX.bash
Created April 19, 2012 04:36
Convert CSV to LaTeX table
# Convert a CSV like the following:
# a,b,c,d,e,f,g
# To the LaTeX table format like the following:
# {a} & {b} & {c} & {d} & {e} & {f} & {g} \\\hline
sed 's/,/} \& {/g' Table1.csv | sed 's/^/{/' | sed 's/$/} \\\\\\hline/' > Table1Format.txt