Skip to content

Instantly share code, notes, and snippets.

@dmontaner
dmontaner / about_nemo_actions.md
Last active September 16, 2020 15:46
How to set up a Nemo (file manager) Actions to execute an R script in BATCH mode. Knitr spin based versions included.

This files and scripts are used to set up some actions for the Nemo file manager. Those actions will let you execute an R script in BATCH mode but using the Nemo graphical interface.

The first action uses the Linux shell command R CMD BATCH and will produce an .Rout file (besides the script results).

The two last action use [knitr::spin][spin] and Pandoc to create HTML or PDF log/report files.

@Clindbergh
Clindbergh / iotcam.py
Last active January 21, 2021 11:31 — forked from loleg/iotcam.py
Detects barcodes from a webcam stream using Python, zbarlight and CV2
#####################################
# This version works on python 3 #
# Install pillow, zbarlight and cv2 #
#####################################
from picamera.array import PiRGBArray
from picamera import PiCamera
import time
import sys
import cv2
@acepace
acepace / rol.im-securegoldenkeyboot
Last active March 25, 2021 00:29
Secure Golden Key Boot: (MS16-094 / CVE-2016-3287 and MS16-100/ CVE-2016-332)
| |
| a w r i t e u p r e l e a s e b y r o l |
| ________ ___ ________ ________ |
| <_ __ \/ \/ \/ ____ \ |
| T T<___/\___/\_ /\ _/\ \__j _/ |
| | | T T T / \ T__\____ T |
| | | | | | \ / |T T T | |
| l__j_____l___j_l__><__j| | | | |
| T _______ T | ___j | l___j | |
| | T __T |_j l_______l________j |
@Speedy37
Speedy37 / userChrome.css
Last active June 2, 2021 08:54
[Proton] button to tabs, sound icon, menu padding
/** Add small space at the top */
.tab-stack {
margin-top: 4px;
}
/** Make tabs looks like tabs not buttons */
/* attach tabs to the toolbar */
.tab-background {
margin: 0px !important;
border-bottom-left-radius: 0 !important;
@OblateSpheroid
OblateSpheroid / semantic-commit-messages.md
Last active September 30, 2021 09:43 — forked from joshbuchea/semantic-commit-messages.md
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format:

<type>(<scope>): <subject>

<body>
@AnomalRoil
AnomalRoil / go-switch-bash
Last active July 1, 2022 13:37
The `go switch` function allows you to easily switch you current Go version
# to add to your ~/.bashrc or your ~/.zshrc file. Usage: $ go switch 1.18.1
function go() {
case $* in
switch* )
shift 1
gobindir=$(go env GOBIN)
# adapt to a valid directory at the beginning of your $PATH if you're not on systemd
homebindir=$(systemd-path user-binaries)
go install golang.org/dl/go"$@"@latest
$gobindir/go"$@" download
@mentha
mentha / flatpak-auto-update.py
Last active September 9, 2022 15:52
flatpak auto update timer
#!/usr/bin/env python3
from argparse import ArgumentParser
from contextlib import suppress
from functools import cached_property
from sys import argv, exit, stderr
from time import time
import dbus
import os
import shlex
#!/bin/bash
### BEGIN INIT INFO
# Provides: disable-transparent-hugepages
# Required-Start: $local_fs
# Required-Stop:
# X-Start-Before: mongod mongodb-mms-automation-agent
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Disable Linux transparent huge pages
# Description: Disable Linux transparent huge pages, to improve
@snej
snej / missing_includes.rb
Created October 2, 2023 16:19
Script to find missing std #includes in C++ headers
#! /usr/bin/env ruby
#
# missing_includes.rb
# By Jens Alfke <jens@couchbase.com>
# Version 2.0 -- 2 Oct 2023
# Copyright 2021-Present Couchbase, Inc.
#
# This script scans C++ header files looking for usage of common standard library classes, like
# `std::vector`, without including their corresponding headers, like `<vector>`. It similarly looks
# for standard C functions like `strlen` that are used without including their header (`<cstring>`.)
@orschiro
orschiro / Image Clipboard Filer.md
Last active October 11, 2023 23:39
Python script that saves an image from clipboard to a file.

Introduction

Saves an image from clipboard to a file.

Dependencies:

  • python2
  • PyGTK

Installation