This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use php\manager\crontab\CrontabManager; | |
$crontab = new CrontabManager(); | |
$job = $crontab->newJob(); | |
$job->on('* * * * *'); | |
$job->onMinute('20-30')->doJob("echo foo;"); | |
$crontab->add($job); | |
$job->onMinute('35-40')->doJob("echo bar;"); | |
$crontab->add($job); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.wave = window.wave || {}; | |
//noinspection ThisExpressionReferencesGlobalObjectJS | |
wave.env = this; | |
/* COMPRESSOR START CUT */ | |
wave.Loader = (function (window) { | |
"use strict"; | |
var out, instance; | |
out = function(window) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (c) 2013 Wave Software. | |
* | |
* The source code contained in this file is owned and/or is subject to | |
* copyright by Wave Software. Only employees of the company, or other | |
* cooperating entities responsible for developing, maintaining and implementing | |
* this code shall be entitled to inspect the contents of the file. If you are | |
* not one of them, delete the file and let us know about a possible theft | |
* attempt by e-mail to: [email protected]. This file may not be reproduced, | |
* used in whole or in part, by persons not listed above. If you need |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static OnPreferenceChangeListener autoOnChangeListener = new OnPreferenceChangeListener() { | |
@Override | |
public boolean onPreferenceChange(Preference rawPreference, Object newValue) { | |
List<CharSequence> selected = Arrays.asList((CharSequence[]) newValue); | |
if (selected.contains("1")) { | |
// do some work | |
} | |
return true; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# You will need latest NVIDIA drivers installed. At the time of writing, version is 331.20. | |
# On ubuntu 13.10, it looks like this: | |
sudo add-apt-repository ppa:xorg-edgers/ppa | |
sudo apt-get update | |
sudo apt-get install nvidia-331 | |
# Now we need to install bumblebee: | |
sudo add-apt-repository ppa:bumblebee/stable | |
sudo apt-get install bumblebee bumblebee-nvidia bbswitch-dkms |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import lombok.Delegate; | |
interface Barker { | |
void bark(); | |
class DefaultImpl implements Barker { | |
@Override | |
public void bark() { | |
System.out.println("Bark, Bark!"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
'use strict'; | |
var EidPreconditions = Eid.preconditions; | |
var checkNotNullable = EidPreconditions.checkNotNullable; | |
var checkArgument = EidPreconditions.checkArgument; | |
var tryToExecute = EidPreconditions.tryToExecute; | |
var app = angular.module('eid-in-ang', []); | |
var eidifyServiceCall = function(eid, target, operation) { | |
checkNotNullable(operation, "20160115:124506", 'Operation should not be nullable'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pl.wavesoftware.exampleapp.MainController | |
import static pl.wavesoftware.jspec.DSL.* | |
describe(MainController, { | |
let 'instance', { describedClass.newInstance } | |
sharedExamples('not throwing any errors', { | |
it { expect { subject }.notTo raiseError } | |
it { expect(subject).notTo beNull } | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ProxyConfigurator configurator = new ProxyConfigurator(); | |
Mapping mapping = configurator.newMappingBuilder() | |
.from(User.class, (user) -> user.getRole().getName() ) | |
.to(UserQuery.class, (query) -> query.getRoleName() ) | |
.andReverseAlso() | |
.build(); | |
configurator.addMapping(mapping); | |
configurator.addMapping( | |
configurator.newMappingBuilder() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.nio.file.Files | |
import java.nio.file.Path | |
import java.nio.file.Paths | |
directory = args[0] // directory | |
d = Paths.get(directory) | |
stream = Files.newDirectoryStream(d) | |
stream.each { | |
p = it as Path; | |
println "file -> ${p}" |
OlderNewer