brew cask install diaAfter his it won't run because DISPLAY=:0 env var is not set
vim /Applications/Dia.app/Contents/Resources/bin/dia| from django.core.management.base import BaseCommand | |
| from rq.registry import FailedJobRegistry | |
| from django_rq.queues import get_queue | |
| from django_rq.utils import get_jobs | |
| class Command(BaseCommand): | |
| help = 'Delete failed jobs from Django RQ.' |
| import axios from 'axios' | |
| export default class ApiClient { | |
| constructor(baseUrl, tokenStorage) { | |
| this.http = axios.create({ | |
| baseURL: baseUrl | |
| }) | |
| this.tokenStorage = tokenStorage | |
| this.setupTokenInterceptors() |
| __pycache__ |
brew cask install diaAfter his it won't run because DISPLAY=:0 env var is not set
vim /Applications/Dia.app/Contents/Resources/bin/dia| aws s3 sync s3://oldbucket s3://newbucket --source-region us-west-1 --region us-west-2 |
| /** | |
| * This code is licensed under the terms of the MIT license | |
| * | |
| * Deep diff between two object, using lodash | |
| * @param {Object} object Object compared | |
| * @param {Object} base Object to compare with | |
| * @return {Object} Return a new object who represent the diff | |
| */ | |
| function difference(object, base) { | |
| function changes(object, base) { |
| import javafx.application.*; | |
| import javafx.geometry.Pos; | |
| import javafx.scene.*; | |
| import javafx.scene.control.Label; | |
| import javafx.scene.layout.*; | |
| import javafx.scene.paint.Color; | |
| import javafx.stage.*; | |
| import javax.imageio.ImageIO; | |
| import java.io.IOException; |
| sudo wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo | |
| sudo sed -i s/\$releasever/6/g /etc/yum.repos.d/epel-apache-maven.repo | |
| sudo yum install -y apache-maven | |
| mvn --version |
| # IE is still braindead so still use favicon.ico | |
| convert -resize x16 -gravity center -crop 16x16+0+0 -flatten -colors 256 input.png output-16x16.ico | |
| convert -resize x32 -gravity center -crop 32x32+0+0 -flatten -colors 256 input.png output-32x32.ico | |
| convert output-16x16.ico output-32x32.ico favicon.ico | |
| # Then, HTML needs to specify size="XxY" as largest size due to browser bugs | |
| <link rel="shortcut icon" href="/favicon.ico" sizes="32x32"> |
| # Here is how to install nvm and node in an Ansible task. | |
| # I tried a bunch of different things, and as usual it's simple, but you have to get it right. | |
| # The important part is that you have to shell with /bin/bash -c and source nvm.sh | |
| --- | |
| - name: Install nvm | |
| shell: > | |
| curl https://raw.githubusercontent.com/creationix/nvm/v0.7.0/install.sh | sh | |
| creates=/home/{{ ansible_user_id }}/.nvm/nvm.sh | |
| - name: Install node and set version |