Skip to content

Instantly share code, notes, and snippets.

View osscontributor's full-sized avatar

OSS Contributor osscontributor

View GitHub Profile
~ % git clone git@github.com:osscontributor/issue13506.git
Cloning into 'issue13506'...
remote: Enumerating objects: 119, done.
remote: Counting objects: 100% (119/119), done.
remote: Compressing objects: 100% (90/90), done.
remote: Total 119 (delta 17), reused 119 (delta 17), pack-reused 0
Receiving objects: 100% (119/119), 803.60 KiB | 4.81 MiB/s, done.
Resolving deltas: 100% (17/17), done.
~ %
~ %
brownj@dhcp5 ~ % git clone git@github.com:jeffbrown/demoforpuneet.git
Cloning into 'demoforpuneet'...
remote: Enumerating objects: 110, done.
remote: Counting objects: 100% (110/110), done.
remote: Compressing objects: 100% (84/84), done.
remote: Total 110 (delta 15), reused 110 (delta 15), pack-reused 0
Receiving objects: 100% (110/110), 803.40 KiB | 3.42 MiB/s, done.
Resolving deltas: 100% (15/15), done.
brownj@dhcp5 ~ %
brownj@dhcp5 ~ %
String operation = env.operation
String components = env.components
String cmd = operation == 'Add' ? '--add_components' : '--remove_components'
sh """
set +x
apt update
apt install -y python2
apt install -y curl
curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py
import java.time.*
import static java.time.DayOfWeek.*
public class BusinessOperations {
List<DayOfWeek> weekendDays = [SUNDAY, SATURDAY]
LocalDate lastBusinessDay( LocalDate dateInMonth ) {
LocalDate lastDayOfMonth = dateInMonth.withDayOfMonth(dateInMonth.month.length(dateInMonth.leapYear))
((lastDayOfMonth)..(lastDayOfMonth - 2)).find {
~ $ cat toms.groovy
interface PRINT {
def LN = '\n\n'
def BREAK = '='*80
}
println PRINT.BREAK
~ $ groovy toms.groovy
================================================================================
void "Deleting a valid file from an existent part" (){
given:
List <Metafile> sampleMetafiles = [new Metafile(id: '1111111111', filename: 'test.pdf', title: '',
description: '', uploadedOn: new Date(),
partId: '2222222222', uploadedBy: 'Alfred', userId: '333333333'),
new Metafile(id: '1111111112', filename: 'test2.pdf', title: '',
description: '', uploadedOn: new Date(),
partId: '2222222221', uploadedBy: 'Alfred', userId: '333333334')
]
// I don't think there are scenarios where this is the best thing to do...
def donors = Donor.createCriteria().list(){
eq('event', event)
}
if(params.sort == "firstName"){
if(params.order == "asc"){
donors.sort {it.firstName}
} else {
~ $ git clone git@github.com:jeffbrown/zaidkhandomaintest.git
Cloning into 'zaidkhandomaintest'...
remote: Enumerating objects: 111, done.
remote: Counting objects: 100% (111/111), done.
remote: Compressing objects: 100% (86/86), done.
remote: Total 111 (delta 11), reused 111 (delta 11), pack-reused 0
Receiving objects: 100% (111/111), 627.88 KiB | 3.09 MiB/s, done.
Resolving deltas: 100% (11/11), done.
~ $
~ $
~ $ mn create-app someapp
| Application created at /Users/jeffscottbrown/someapp
~ $
~ $ cd someapp
someapp $
someapp $ mn --help
Usage: mn [-hvVx] [COMMAND]
Micronaut CLI command line interface for generating projects and services.
Application generation commands are:
public void subscribeToMqtt(Message message) {
executor.cppMethod();
}
public class TestExecutor {
static {
System.loadLibrary("native");
}
public native String cppMethod();
}