Skip to content

Instantly share code, notes, and snippets.

View azizkhani's full-sized avatar
🏠
Working from home

Ali Akbar Azizkhani azizkhani

🏠
Working from home
View GitHub Profile
@azizkhani
azizkhani / exception.log
Created January 30, 2018 09:57
javax.persistence.TransactionRequiredException: no transaction is in progress
2018-01-30 13:17:20 DEBUG o.s.t.j.WebLogicJtaTransactionManager - Initiating transaction rollback after commit exception
javax.persistence.TransactionRequiredException: no transaction is in progress
at org.hibernate.internal.SessionImpl.checkTransactionNeeded(SessionImpl.java:3461)
at org.hibernate.internal.SessionImpl.doFlush(SessionImpl.java:1425)
at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1421)
at org.springframework.orm.hibernate5.SessionFactoryUtils.flush(SessionFactoryUtils.java:144)
at org.springframework.orm.hibernate5.SpringSessionSynchronization.beforeCommit(SpringSessionSynchronization.java:95)
at org.springframework.transaction.support.TransactionSynchronizationUtils.triggerBeforeCommit(TransactionSynchronizationUtils.java:95)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.triggerBeforeCommit(AbstractPlatformTransactionManager.java:932)
at org.springframework.transaction.support.AbstractPlatformTransactio
@azizkhani
azizkhani / inspect
Last active February 21, 2018 17:13
docker inspect 43b9f5d12c27
[
{
"Id": "43b9f5d12c27e2557840f1c19f2d47163beddf12aa6b6d3f299d797e2e2a2f6d",
"Created": "2018-01-09T19:38:18.822310924Z",
"Path": "/entrypoint.sh",
"Args": [
"mysqld"
],
"State": {
Running after script...
$ mkdir -p ~/.ssh
$ eval $(ssh-agent -s)
Agent pid 16
$ echo "$SSH_PRIVATE_KEY" | ssh-add -
Identity added: (stdin) ((stdin))
$ ssh-keyscan -H 51.254.79.225 >> ~/.ssh/known_hosts
# 51.254.79.225:22 SSH-2.0-OpenSSH_6.6.1
# 51.254.79.225:22 SSH-2.0-OpenSSH_6.6.1
# 51.254.79.225:22 SSH-2.0-OpenSSH_6.6.1
@azizkhani
azizkhani / docker_kill.sh
Created March 3, 2018 17:37 — forked from evanscottgray/docker_kill.sh
kill all docker containers at once...
docker ps | awk {' print $1 '} | tail -n+2 > tmp.txt; for line in $(cat tmp.txt); do docker kill $line; done; rm tmp.txt
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
/* tslint:disable max-line-length */
import {ComponentFixture, TestBed} from '@angular/core/testing';
import {HttpResponse} from '@angular/common/http';
import {Observable} from 'rxjs/Observable';
import {JhipsterTestModule} from '../../../test.module';
import {TaskDetailComponent} from 'app/entities/task/task-detail.component';
import {TaskService} from 'app/entities/task/task.service';
import {Task} from 'app/shared/model/task.model';
import {ActivatedRoute} from '@angular/router';
@azizkhani
azizkhani / tslint
Created April 16, 2018 15:22
tslint:enable disable
/* tslint:disable */
constructor(private alertService: JhiAlertService, private eventManager: JhiEventManager, private translateService: TranslateService) {
/* tslint:enable */
services:
- name: docker:dind
command: ["--insecure-registry=registry.bucker.net"]
git init
echo "# MESSAGE" >> README.md
git add README.md
git status
git commit -m "first commit"
git add .
git push
git remote -v #list remote url
git remote add origin http://github.com
git remote set_url origin http:github.com
@azizkhani
azizkhani / mysql-docker.sh
Created August 30, 2018 06:16 — forked from spalladino/mysql-docker.sh
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE