Skip to content

Instantly share code, notes, and snippets.

View finografic's full-sized avatar

Justin Blair Rankin finografic

  • finografic
  • Barcelona, Spain
View GitHub Profile
{
"words":"-------------------------------------------------------------",
"words.Technologies":"Technologies",
"Sidebar":"-----------------------------------------------------------",
"Sidebar.nav.list":[
{
"label": "Profile",
"url": "profile"
},
{
#!/bin/bash
SCREENSHOT_FILE="$HOME/Pictures/screenshots/Screenshot_$(date +%Y-%m-%d_%H:%M:%S)"
gnome-screenshot --area --file=$SCREENSHOT_FILE
xclip -selection clipboard -target image/png -i $SCREENSHOT_FILE
@finografic
finografic / app-activations.json
Created March 28, 2020 13:03
App definitions, "favorites" to be read by script: app-activate
{
"apps": {
"pocketcasts": {
"id": "play.pocketcasts.com__podcasts.Chromium",
"cmd": "/snap/bin/chromium --app=https://play.pocketcasts.com/podcasts &"
}
}
}
@finografic
finografic / app-activate
Last active March 28, 2020 13:05
Script to either focus existing/open app window, or open new instance app
#!/bin/bash
# Name: app-activate
# Author: Jusitn Rankin <[email protected]>
# Description: script to activate and bring into focus a specified app window, if already open;
# otherwise, open a new instance of app, avoiding opening multiple instances.
# Requires:
# - sudo apt install -y wmctrl
# - sudo apt install -y jp
# - companion JSON file ./app-activations.json containing entries of app "favorites"
@finografic
finografic / .npm-init.js
Created October 1, 2019 11:52 — forked from BretCameron/.npm-init.js
A custom npm init script, which incorporates an initial GitHub commit. The file should be in your home directory.
const { execSync } = require('child_process');
function run(func) {
console.log(execSync(func).toString())
}
module.exports = {
name: prompt('package name', basename || package.name),
version: prompt('version', '0.0.0'),
decription: prompt('description', ''),
@finografic
finografic / github.css
Last active September 27, 2019 05:01 — forked from theconektd/github.css
Github Markdown CSS - for Markdown Editor Preview
body {
font-family: Helvetica, arial, sans-serif;
font-size: 14px;
line-height: 1.6;
padding-top: 10px;
padding-bottom: 10px;
background-color: white;
padding: 30px; }
body > *:first-child {
@finografic
finografic / webstoemp-gulpfile.js
Created May 23, 2019 18:29 — forked from jeromecoupe/webstoemp-gulpfile.js
Gulp 4 sample gulpfile.js. For a full explanation, have a look at https://www.webstoemp.com/blog/switching-to-gulp4/
"use strict";
// Load plugins
const autoprefixer = require("autoprefixer");
const browsersync = require("browser-sync").create();
const cp = require("child_process");
const cssnano = require("cssnano");
const del = require("del");
const eslint = require("gulp-eslint");
const gulp = require("gulp");
@finografic
finografic / .prettierrc
Created April 20, 2019 09:15
.prettierrc
{
"parser": "babel-flow",
"printWidth": 120,
"useTabs": false,
"tabWidth": 2,
"singleQuote": true,
"semi": true,
"trailingComma": "es5",
"bracketSpacing": true,
"arrowParens":"always",

Rsync Tips & Tricks

  • rsync -auzPhv --delete --exclude-from=rsync_exclude.txt SOURCE/ DEST/ -n
    • -a -> --archive; recursively sync, preserving symbolic links and all file metadata
    • -u -> --update; skip files that are newer on the receiver; sometimes this is inaccurate (due to Git, I think...)
    • -z -> --compress; compression
    • -P -> --progress + --partial; show progress bar and resume interupted transfers
    • -h -> --human-readable; human-readable format
    • -v -> --verbose; verbose output
  • -n -> --dry-run; dry run; use this to test, and then remove to actually execute the sync
@finografic
finografic / .gitignore
Last active September 24, 2019 13:23 — forked from octocat/.gitignore
Some of my common .gitignore configurations - forked from - https://help.github.com/articles/ignoring-files/
# GIT #
##############
.gitignore-rules
.gitignore-starter
.git-bak
.git-BAK
# COMMON #