Skip to content

Instantly share code, notes, and snippets.

View octavian-nita's full-sized avatar

Octavian Nita octavian-nita

View GitHub Profile
#!/usr/bin/env bash
# Consider writing robust bash shell scripts ( http://mywiki.wooledge.org/ ;)
set -o nounset
# ----------------------
# Command line arguments
# ----------------------
package ...;
import static com.google.common.base.CaseFormat.*;
import static com.google.common.base.CharMatcher.is;
class CamelName {
static <E extends Enum<E>> String camelName(E enumValue) {
return enumValue == null ? null : UPPER_UNDERSCORE.to(LOWER_CAMEL, is('_').trimLeadingFrom(enumValue.name()));
}
package ...;
import lombok.*;
import java.util.*;
import java.util.function.BiConsumer;
import java.util.regex.Pattern;
import static java.util.Objects.*;
package ...util.perf;
import lombok.NonNull;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.*;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.*;
import org.springframework.util.StopWatch;
#!/usr/bin/env bash
# Consider writing robust bash shell scripts ( http://mywiki.wooledge.org/ ;)
set -o nounset
# ----------------------
# Command line arguments
# ----------------------
#!/usr/bin/env bash
# Consider writing robust bash shell scripts ( http://mywiki.wooledge.org/ ;)
set -o nounset
# ----------------------
# Command line arguments
# ----------------------
#!/usr/bin/env bash
# Consider writing robust bash shell scripts ( http://mywiki.wooledge.org/ ;)
set -o nounset
# ----------------------
# Command line arguments
# ----------------------
#!/usr/bin/env python3
from os import path, makedirs
from string import Template
if __name__ == '__main__':
def generate_config_xml(job, template, mapping, **kwds):
print("\nGenerating Jenkins job config file in %s..." % job)
makedirs(job, exist_ok=True)
@octavian-nita
octavian-nita / estk-util.jsx
Created January 5, 2018 14:47
ExtendScript Toolkit / utilities
/* globals $, app, BridgeTalk */
// Adobe Bridge et al. automation scripts
//
// ## (Adobe scripting-related) Resources
//
// * https://openclassrooms.com/courses/ecrivez-des-scripts-en-extendscript
// * https://github.com/yearbook/extendscript-api-documentation -> http://yearbook.github.io/esdocs/
// * https://github.com/ExtendScript/wiki/wiki
// * https://github.com/fabiantheblind/extendscript-101
@octavian-nita
octavian-nita / wrapper.css
Created August 9, 2017 14:06
The Best Way to Implement a “Wrapper” in CSS (?) (@see https://css-tricks.com/best-way-implement-wrapper-css/)
/**
* See https://css-tricks.com/best-way-implement-wrapper-css/
*
* 1. Centers the content. Yes, it's a bit opinionated.
* 2. See the "width vs max-width" section
* 3. See the "Additional Padding" section
*/
.wrapper {
margin-right: auto; /* 1 */
margin-left: auto; /* 1 */