Skip to content

Instantly share code, notes, and snippets.

View drofp's full-sized avatar
💤
Probably should be sleeping

Don Robert Pornaras drofp

💤
Probably should be sleeping
  • Google LLC
  • San Jose, CA
  • 08:17 (UTC -07:00)
View GitHub Profile
@drofp
drofp / settings.json
Created January 14, 2023 05:13
VS Code settings on ubuntu
// settings from github profile
{
"python.pythonPath": "/anaconda3",
"editor.suggestSelection": "first",
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"workbench.colorTheme": "Dracula Soft",
"files.trimTrailingWhitespace": true,
"python.jediEnabled": false,
"git.autofetch": true,
@drofp
drofp / tmux_iterm_scrollback.md
Created March 30, 2021 16:49
Tmux iterm integration tips and best practices

Change scrollback limit for tmux buffer on iterm

Original stackoverflow post here

Solution

  • iTerm2 build 1.0.0.20130302 has an preference which enables it to capture scrollback even when a so-called hard status line is present:
  • maybe also check "Save lines to scrollback in alternate screen mode"
@drofp
drofp / pixelvals.html
Created October 18, 2020 22:47
show pixels values where mouse is hovering: https://yangcha.github.io/ImageViewer/
<!DOCTYPE HTML>
<!-- Display image, show mouse position and pixel values
Author: Changjiang Yang
Date: 08/14/2016
TODO: Add drag and drop
source: https://yangcha.github.io/ImageViewer/
-->
<html>
<head>
<style>
@drofp
drofp / oh-my-zsh setup
Created October 12, 2020 22:31
zsh setup notes
https://medium.com/@ivanaugustobd/your-terminal-can-be-much-much-more-productive-5256424658e8
# Summary
## Install
1) ZSH
```
Fedora: dnf install zsh
Arch: pacman -S zsh zsh-completions
*SUSE: zypper in zsh
Ubuntu: apt install zsh
@drofp
drofp / ubuntu20.04_default.zshrc
Created October 12, 2020 21:52
ubuntu 20.04 default .zshrc
# Set up the prompt
autoload -Uz promptinit
promptinit
prompt adam1
setopt histignorealldups sharehistory
# Use emacs keybindings even if our EDITOR is set to vi
bindkey -e
@drofp
drofp / 02-05-computation-on-arrays-broadcasting.ipynb
Created August 30, 2020 06:50
02.05-Computation-on-arrays-broadcasting.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@drofp
drofp / compinit.zsh
Created July 12, 2019 22:38 — forked from ctechols/compinit.zsh
Speed up zsh compinit by only checking cache once a day.
# On slow systems, checking the cached .zcompdump file to see if it must be
# regenerated adds a noticable delay to zsh startup. This little hack restricts
# it to once a day. It should be pasted into your own completion file.
#
# The globbing is a little complicated here:
# - '#q' is an explicit glob qualifier that makes globbing work within zsh's [[ ]] construct.
# - 'N' makes the glob pattern evaluate to nothing when it doesn't match (rather than throw a globbing error)
# - '.' matches "regular files"
# - 'mh+24' matches files (or directories or whatever) that are older than 24 hours.
autoload -Uz compinit
@drofp
drofp / ordered_dithering.txt
Created April 12, 2019 07:04 — forked from MehdiNS/ordered_dithering.txt
Ordered dithering explanation
(Written as a way to stop forgetting these things.
May be wrong sometimes, as it's just the result of my research here and there.
If it helps you, give me a shout!)
Ordered dithering is a technique used to reduce - deliberately! - the precision of an image.
Motivation : artistic (mainly ?), color quantization --> reduce the number of color in an image
----------------------------------------------------------------
INTRODUCTION
@drofp
drofp / manual-uninstall-paragon-ntfs.sh
Created March 11, 2019 06:29 — forked from guycalledseven/manual-uninstall-paragon-ntfs.sh
Manually remove Paragon NTFS v15 leftovers MacOS
# after appcleaner does his magic, do this
sudo rm -rf "/Library/Application Support/Paragon Software/"
sudo rm /Library/LaunchDaemons/com.paragon-software.installer.plist
sudo rm /Library/LaunchDaemons/com.paragon-software.ntfs.loader.plist
sudo rm /Library/LaunchDaemons/com.paragon-software.ntfsd.plist
sudo rm /Library/LaunchAgents/com.paragon-software.ntfs.notification-agent.plist
sudo rm -rf /Library/Filesystems/ufsd_NTFS.fs/
sudo rm -rf /Library/PrivilegedHelperTools/com.paragon-software.installer
sudo rm -rf /Library/Extensions/ufsd_NTFS.kext/
@drofp
drofp / GraphPanel
Created December 8, 2018 11:45 — forked from roooodcastro/GraphPanel.java
A simple Swing component to draw a Graph over a regular JPanel. Features a grid, customizable amount of hatch marks, axis labels,checking for minimum and maximum value to label correctly the Y-axis and customizable padding and label padding. Based on "Hovercraft Full Of Eels"'s answer on StackOverflow (http://stackoverflow.com/questions/8693342/…
import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.FontMetrics;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Point;
import java.awt.RenderingHints;
import java.awt.Stroke;
import java.util.ArrayList;