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 'dart:async'; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter/cupertino.dart'; | |
final Color darkBlue = Color.fromARGB(255, 18, 32, 47); | |
void main() { | |
runApp(MyApp()); | |
} |
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
# backup remote docker volume to local tar file | |
ssh USER@HOST 'docker run --rm -v VOLUME_NAME:/from alpine ash -c "cd /from ; tar -czf - . "' > FILENAME.tgz | |
# backup remote docker volume to local volume | |
ssh USER@HOST 'docker run --rm -v VOLUME_NAME:/from alpine ash -c "cd /from ; tar -czf - . "' | docker run --rm -i -v VOLUME_NAME:/to alpine ash -c "cd /to ; tar -xzvf - " | |
# copy local docker volume to remote volume | |
docker run --rm -v VOLUME_NAME:/from alpine ash -c "cd /from ; tar -czf - . " | ssh USER@HOST 'docker run --rm -i -v VOLUME_NAME:/to alpine ash -c "cd /to ; tar -xzvf - "' |
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
public class MultiTenantJpaTransactionManager extends JpaTransactionManager { | |
@Inject | |
private CurrentTenantResolver tenantResolver; | |
@Override | |
protected void doBegin(final Object transaction, final TransactionDefinition definition) { | |
super.doBegin(transaction, definition); | |
final EntityManagerHolder emHolder = (EntityManagerHolder) TransactionSynchronizationManager.getResource(getEntityManagerFactory()); | |
final EntityManager em = emHolder.getEntityManager(); |
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
<?xml version="1.0"?> | |
<settings> | |
<servers> | |
<server> | |
<id>nexus</id> | |
<username>user</username> | |
<password>*******</password> | |
</server> | |
</servers> | |
<mirrors> |
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
# /usr/share/X11/xorg.conf.d/rat-9.conf | |
Section "InputClass" | |
Identifier "R.A.T" | |
MatchProduct "R.A.T.9" | |
MatchDevicePath "/dev/input/event*" | |
Option "Buttons" "17" | |
Option "ButtonMapping" "1 2 3 4 5 0 0 8 9 7 6 12 0 0 0 16 17" | |
Option "AutoReleaseButtons" "13 14 15" | |
Option "ZAxisMapping" "4 5 6 7" | |
EndSection |
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
# docker | |
# edit /etc/default/grub see https://github.com/moby/moby/issues/4250 | |
GRUB_CMDLINE_LINUX_DEFAULT="cgroup_enable=memory swapaccount=1" | |
# and | |
sudo update-grub | |
# webupd8 java & sublime | |
sudo add-apt-repository ppa:webupd8team/java | |
sudo add-apt-repository ppa:webupd8team/sublime-text-3 | |
sudo apt update |
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 org.eclipse.persistence.descriptors.ClassDescriptor; | |
import org.eclipse.persistence.descriptors.MultitenantPolicy; | |
import org.eclipse.persistence.descriptors.SingleTableMultitenantPolicy; | |
import org.eclipse.persistence.expressions.Expression; | |
import org.eclipse.persistence.expressions.ExpressionBuilder; | |
import org.eclipse.persistence.internal.helper.DatabaseField; | |
import org.eclipse.persistence.internal.sessions.AbstractSession; | |
public class SelectiveMultitenantPolicy extends SingleTableMultitenantPolicy { |
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
alias ..='cd ..' | |
alias apt='sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade && sudo apt-get autoremove && sudo apt-get autoclean' | |
alias java7='sudo apt-get install oracle-java7-set-default' | |
alias java8='sudo apt-get install oracle-java8-set-default' | |
alias showjava='echo $JAVA_HOME' | |
alias mvnci='mvn clean install' | |
alias mvnj='mvn jetty:run' | |
alias mvncj='mvn clean jetty:run' |
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 <Objection/Objection.h> | |
#import <ReactiveCocoa/ReactiveCocoa.h> | |
#import <ReactiveCocoa/RACEXTScope.h> | |
#import "TableDataViewModel.h" | |
#import "RestApiConnector.h" | |
const NSUInteger kPageSize = 30; | |
@interface TableDataViewModel () |