Skip to content

Instantly share code, notes, and snippets.

View dmvianna's full-sized avatar

Daniel Vianna dmvianna

View GitHub Profile

Keybase proof

I hereby claim:

  • I am dmvianna on github.
  • I am dmvianna (https://keybase.io/dmvianna) on keybase.
  • I have a public key ASAfmvS2jxgUS7nQKFY5c_rmy8RRQHuy1gaOUzT0tQI1xwo

To claim this, I am signing this object:

@dmvianna
dmvianna / emacsclient.desktop
Last active November 16, 2022 04:22
~/.local/share/applications/emacsclient.desktop
[Desktop Entry]
Name=Emacs (Client)
GenericName=Text Editor
Comment=Edit text
MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;
Exec=emacsclient -c --alternate-editor="" %F
Icon=emacs
Type=Application
Terminal=false
Categories=Development;TextEditor;
#!/usr/bin/env bash
set -e
#
# This script uses poetry to bundle all the dependencies
# found in `pyproject.toml` into a zip file that can be
# then uploaded to AWS Lambda.
#
@dmvianna
dmvianna / ThinkLight
Created October 26, 2019 11:13 — forked from vzaliva/ThinkLight
This script controll keyboard backlight on IBM ThinkPad X-series
#!/bin/bash
# Vadim Zaliva lord@crocodile.org
# based on https://gist.github.com/hadess/6847281
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root" 1>&2
exit 1
fi
@dmvianna
dmvianna / thinkfan.nix
Created October 26, 2019 10:36 — forked from truthadjustr/thinkfan.nix
nixos: thinkfan configuration in /etc/nixos/configuration.nix
# Thinkpad T440
# postconditions:
# 1) status should be enabled:
# cat /proc/acpi/ibm/fan
# 2) No errors in systemd logs:
# journalctl -u thinkfan.service -f
services = {
thinkfan = {
planet data search --item-type PSScene4Band --geom 'planet/test.geojson' --date acquired gt 2018-04-01 --date acquired lt 2018-04-08 --range cloud_cover lt 0.2 > planet/response.json
planet data download --item-type PSScene4Band --geom 'planet/test.geojson' --date acquired gt 2018-04-01 --date acquired lt 2018-04-08 --range cloud_cover lt 0.2 --asset-type 'analytic' --dest 'planet/data'
# run with
# $ nix-env -iA userPackages -f '<nixpkgs>'
# to install packages functionally
with (import <nixpkgs> {});
{
packageOverrides = pkgs: with pkgs; {
userPackages = buildEnv {
inherit ((import <nixpkgs/nixos> {}).config.system.path)
@dmvianna
dmvianna / configuration.nix
Last active February 16, 2018 08:09
configuration.nix
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
#!/usr/bin/env bash
if [ -f $HOME/.Xmodmap ]; then
/usr/bin/xmodmap $HOME/.Xmodmap
fi
urxvt
remove mod1 = Alt_R
add mod3 = Alt_R