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
This snippet tested on Yosemite 10.10.1 | |
1. Define your python3 directory (for example, "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/") | |
2. Download "http://download.qt-project.org/official_releases/qt/5.3/5.3.2/qt-opensource-mac-x64-clang-5.3.2.dmg" or any other new version of qt for mac and install it. | |
3. Download SIP sources here: http://www.riverbankcomputing.com/software/sip/download | |
4. Download PyQt5-gpl sources here: http://www.riverbankcomputing.com/software/pyqt/download5 | |
5. Go to your downloads by terminal (for example, "cd ~/Downloads") | |
6. tar xvf PyQt-gpl-5.3.2.tar.gz | |
7. tar xvf sip-4.16.4.tar.gz | |
8. cd sip-4.16.4/ |
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
# Originally written by @thomas-w on stackoverflow: http://askubuntu.com/questions/515038/the-package-lists-or-status-file-could-not-be-parsed-or-openederror-during-inst | |
#!/bin/bash | |
sudo cp -arf /var/lib/dpkg /var/lib/dpkg.backup | |
sudo cp /var/lib/dpkg/status-old /var/lib/dpkg/status | |
sudo cp /var/lib/dpkg/available-old /var/lib/dpkg/available | |
sudo rm -rf /var/lib/dpkg/updates/* | |
sudo rm -rf /var/lib/apt/lists | |
sudo mkdir /var/lib/apt/lists | |
sudo mkdir /var/lib/apt/lists/partial | |
sudo apt-get clean |
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
How to package a multiarchitecture-source debian package (C++/Qt): | |
1. copy sources to a directory with format: <project_name>-<version> | |
2. cd <project_name>-<version> | |
3. dh_make -s -c gpl -e <email> --createorig | |
4. dpkg-buildpackage -S |
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
in ~/.Xresources: | |
Xft.dpi: 96 | |
Xft.antialias: true | |
Xft.rgba: rgb | |
Xft.hinting: true | |
Xft.hintstyle: hintslight | |
Xft.lcdfilter: lcddefault | |
Xft.embeddedbitmap: false |
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
enum MachineState { | |
Normal, | |
Comment, | |
Upper, | |
Lower, | |
} | |
fn machine_cycle(state: &MachineState, character: char) -> (Option<char>, MachineState) { | |
use std::ascii::AsciiExt; |
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
# How to sign your custom RPM package with GPG key | |
# Step: 1 | |
# Generate gpg key pair (public key and private key) | |
# | |
# You will be prompted with a series of questions about encryption. | |
# Simply select the default values presented. You will also be asked | |
# to create a Real Name, Email Address and Comment (comment optional). | |
# | |
# If you get the following response: |
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
#lang typed/racket | |
(require racket/cmdline) | |
(: square (-> Real Real)) | |
(define (square x) | |
(* x x)) | |
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
-Wall -Werror -Wextra -Wno-unused -Wcast-align -Wcast-qual -Wctor-dtor-privacy | |
-Wdisabled-optimization -Wformat=2 -Winit-self -Wmissing-declarations | |
-Wmissing-include-dirs -Wold-style-cast -Woverloaded-virtual -Wredundant-decls | |
-Wshadow -Wsign-conversion -Wsign-promo -Wstrict-overflow=5 -Wswitch-default | |
-Wundef -Wabi -Winline -Wzero-as-null-pointer-constant |
-
Delete all containers
$ docker ps -q -a | xargs docker rm
-q prints only the container IDs -a prints all containers
Notice that it uses xargs to issue a remove container command for each container ID
- Delete all untagged images
OlderNewer