Skip to content

Instantly share code, notes, and snippets.

View tmarwen's full-sized avatar
🇵🇸

Marouane Trabelsi tmarwen

🇵🇸
View GitHub Profile
@tmarwen
tmarwen / grab_avatars_for_git_users.pl
Created January 14, 2021 10:53 — forked from pmdgithub/grab_avatars_for_git_users.pl
Grab avatars for github users, use for: gource --user-image-dir .git/avatar/
#!/usr/bin/perl
#fetch Gravatars
use strict;
use warnings;
use LWP::Simple;
use Digest::MD5 qw(md5_hex);
my $size = 90;
@tmarwen
tmarwen / gist:09f086d839cafe3d5a38069c2972e79f
Created July 1, 2019 14:51 — forked from digitaljhelms/gist:4287848
Git/GitHub branching standards & conventions

Branching

Quick Legend

Description, Instructions, Notes
Instance Branch
#!/usr/bin/env groovy
import groovy.xml.MarkupBuilder
def xml = new XmlSlurper().parse(new File(args[0]));
def sw = new StringWriter()
def b = new MarkupBuilder(sw)
def i = 0;
b.dependencyManagement() {
dependencies() {
@tmarwen
tmarwen / ApplicationConfig.java
Created October 26, 2015 15:52 — forked from ivargrimstad/ApplicationConfig.java
Microservices in Java - Swarm example
@ApplicationPath("/")
public class ApplicationConfig extends Application {
@Override
public Set<Class<?>> getClasses() {
Set<Class<?>> resources = new HashSet<>();
resources.add(HelloResource.class);
return resources;
}
}
@tmarwen
tmarwen / Application.java
Created October 26, 2015 15:52 — forked from ivargrimstad/Application.java
Microservices in Java - Boot example
@Configuration
@EnableAutoConfiguration
@EnableEurekaClient
@RestController
public class Application {
@RequestMapping("/")
public String home() {
return "Hello World";
}
@tmarwen
tmarwen / git_add_file_with_long_name_windows_os.md
Created September 18, 2015 14:12
Git cannot create a file or directory with a long path - Windows OS

Summary

Problem

Windows does not properly support files and directories longer than 260 characters. This applies to Windows Explorer, cmd.exe and many other applications (including many IDEs as well as bash, perl and tcl that come with Git for Windows).

Opt-In configuration

For this reason, long paths support in Git for Windows is disabled by default.

@tmarwen
tmarwen / goot_commit_messages.md
Last active September 9, 2015 09:24
Writing good commit messages

Good commit messages serve at least three important purposes:

  • To speed up the reviewing process.

  • To help us write a good release note.

  • To help the future maintainers (it could be you!), say five years into the future, to find out why a particular change was made to the code or why a specific feature was added.

Structure your commit message like this:

# create directory
create directory dmpdir as 'c:/temp';
select directory_name,directory_path from dba_directories;
# expdp owner
create user scott identified by tiger;
grant connect, resource to scott;
...
grant read, write on directory dmpdir to scott;
expdp scott/tiger@xe directory=dmpdir dumpfile=scott.dmp logfile=expdp.log
@tmarwen
tmarwen / git.css
Last active August 29, 2015 14:15 — forked from neilgee/git.css
/* Set up Git Configuration */
git config --global user.email "you@yourdomain.com"
git config --global user.name "Your Name"
git config --global core.editor "vi"
git config --global color.ui true
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script>