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
(defun org-format-hyperlink (link-text-start link-text-end) | |
"Format the selected text as a orgmode link prompting for the link" | |
(interactive "r") | |
;(setq clip (shell-command-to-string "xclip -selection clip -t TEXT -o")) | |
(setq dest-link (read-string "Link to insert: ")); nil nil (nth 0 kill-ring))) | |
(if (not (string-blank-p dest-link)) | |
(progn (goto-char link-text-start) | |
(setq tmp-link (concat `"[[" dest-link `"][" (buffer-substring link-text-start link-text-end) '"]]")) | |
(delete-region link-text-start link-text-end) | |
(insert tmp-link)) |
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
from PIL import Image | |
# from functools import reduce | |
import numpy as np | |
def pxmean(m, y0, x0, s): | |
c = 0 | |
for _x in range(0, pxsize): |
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
{ | |
"on": [ 9630, 4420, 630, 570, 580, 570, 580, 570, 630, 520, 630, 570, 580, 570, 630, 570, 580, 570, 580, 1670, 630, 1620, 630, 1670, 580, 1670, 630, 1670, 580, 1670, 630, 1620, 630, 1670, 630, 1620, 630, 570, 630, 1620, 630, 570, 580, 570, 630, 570, 580, 1670, 630, 570, 580, 570, 630, 1670, 630, 520, 680, 1620, 630, 1670, 580, 1670, 680, 520, 680, 1570, 630 ], | |
"off": [ 9580, 4420, 680, 470, 680, 470, 680, 520, 680, 470, 680, 470, 680, 470, 680, 520, 680, 470, 680, 1570, 680, 1620, 680, 1570, 680, 1570, 680, 1620, 680, 1570, 680, 1570, 680, 1620, 680, 1570, 680, 1570, 730, 1570, 680, 470, 680, 520, 680, 470, 680, 1620, 680, 470, 680, 520, 680, 470, 680, 520, 680, 1570, 680, 1570, 730, 1570, 680, 470, 730, 1570, 680 ], | |
"red": [ 9580, 4470, 630, 520, 630, 570, 580, 570, 630, 570, 580, 570, 580, 570, 630, 520, 630, 570, 580, 1670, 580, 1670, 630, 1620, 630, 1620, 630, 1620, 630, 1620, 630, 1670, 630, 1620, 580, 570, 630, 1670, 630, 1620, 630, 520, 630, 1670, 630, 520, 630, 570, 630, 520, 630, 1620, 630, 570, |
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
struct SpinnyThing { | |
index: usize, | |
} | |
impl SpinnyThing { | |
const V: [&'static str; 4] = ["/","-", "\\", "|"]; | |
fn new() -> SpinnyThing { | |
SpinnyThing { index: 0 } | |
} | |
} |
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
[Desktop Entry] | |
Type=Application | |
Name=Quartus Intel FPGA Lite 20.1 | |
Exec=/home/mluctins/.intelFPGA/20.1/quartus/bin/quartus | |
Terminal=false | |
GenericName=EDA | |
Icon=/home/mluctins/.local/share/icons/quartus.ico | |
Categories=Development;EDA; | |
StartupWMClass=Quartus |
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
# Settle time | |
# @author: Lucas Martins Mendes - [email protected] | |
function ret = settle_t(F, X = [], T = [], tolerance=0.02) | |
if size(X) == [0 0] || size(T) == [0 0] | |
[X, T] = step(F); | |
endif | |
_X = flip(X); | |
_T = flip(T); | |
s_top = (1+tolerance)*dcgain(F); | |
s_bot = (1-tolerance)*dcgain(F); |
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
alias stophd='sudo hdparm -B1' #<path to drive> | |
#Usage: stophd /dev/sdb |
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 is free and unencumbered software released into the public domain. | |
Anyone is free to copy, modify, publish, use, compile, sell, or | |
distribute this software, either in source code form or as a compiled | |
binary, for any purpose, commercial or non-commercial, and by any | |
means. | |
In jurisdictions that recognize copyright laws, the author or authors | |
of this software dedicate any and all copyright interest in the |
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
/** | |
@brief print a number as a decimal (because of memory constraints the limited printf only works for hex and strings, no decimals). | |
*/ | |
void print_num(alt_u32 num) | |
{ | |
char buff[15],tmp; | |
char * str = buff; | |
alt_u8 dp=0; /*number of decimal places*/ | |
if(num == 0) | |
{ |
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
alias setmonitorbrightness='sudo ddcutil --display 1 setvcp 10' |
NewerOlder