This script is a simple jq
wrapper to search Elm packages.
Elm packages use the pattern <username>/<packagename>
but for me is quite usual to remember only the package name.
This is a fast and dirty solution built upon the fantastic jq tool.
list: | |
@just --list | |
# Optimize PDF file | |
pdfoptimize SOURCE: | |
cp "{{SOURCE}}" "{{SOURCE}}.bak" | |
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook -dNOPAUSE -dQUIET -dBATCH -sOutputFile="{{SOURCE}}" "{{SOURCE}}.bak" | |
ls -lah "{{SOURCE}}" "{{SOURCE}}.bak" | |
# Move to PROJECT dev folder (and environment) |
class Checked(object): | |
""" | |
This class offers a `checked()` method that returns the same namedtuple after an user defined check. | |
The returned class is not exacly the same, but is in fact a copy with an added marker base class. | |
Given the `namedtuple` immutability, the marker base class is used to skip the checks after the first run. | |
""" | |
class Done: # Using `Done(object)` let the code work as expected in Python 2 too | |
__slots__ = () |
# ####################################################################### | |
# Somewhat safer unpickler, only builtins (/usr/lib/python2.7/pickle.py) | |
# ####################################################################### | |
class LimitedUnpickler(pickle.Unpickler): | |
""" | |
This class inherits all the implementation from the builtin | |
`pickle.Unpickler` but modifies the `self.dispatch` dictionary | |
used to unpack the serialized structures. | |
"""distutils.msvc9compiler | |
Contains MSVCCompiler, an implementation of the abstract CCompiler class | |
for the Microsoft Visual Studio 2008. | |
The module is compatible with VS 2005 and VS 2008. You can find legacy support | |
for older versions of VS in distutils.msvccompiler. | |
""" | |
# Written by Perry Stoll |
package main | |
import ( | |
"log" | |
"os" | |
"os/exec" | |
"path/filepath" | |
"strings" | |
) |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
from typing import Sequence, Union | |
# Does not typecheck yet because of the hardcoded slice int types | |
class KeyErrorWithChildren(KeyError): | |
pass | |
TrieKey = Union[Sequence,slice] |
from PyQt4.Qt import * | |
def teeSignal(*sig_args, **kwargs): | |
if "name" not in kwargs: | |
raise ValueError("Signal name required for old style emit compatibility") | |
class X(QObject): | |
signal = pyqtSignal(*sig_args, **kwargs) | |
x = X() | |
sig_name = kwargs["name"] | |
has_args = len(sig_args) > 0 |
I hereby claim:
To claim this, I am signing this object:
--- | |
- hosts: local | |
sudo: yes | |
vars: | |
home: "{{ lookup('env','HOME') }}" | |
tasks: | |
- name: enable multiarch | |
command: dpkg --add-architecture i386 | |
- name: install deps | |
apt: name={{ item }} update_cache=yes cache_valid_time=3600 |