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";
}
# 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>
#---------------------------------------------------------------------
#
# Parse the response from Sonatype Nexus in order to determine the
# correct URI for the most recent snapshot of an artifact.
#
# Usage:
# ruby get_latest_snapshot.rb \
# -n http://localhost:8080/nexus \
# -g uk.co.scattercode \
# -a my-artifact \
import com.github.jknack.handlebars.Helper;
import com.github.jknack.handlebars.Options;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
import javax.script.ScriptException;
import java.io.IOException;
import java.io.InputStream;