Skip to content

Instantly share code, notes, and snippets.

View rudimusmaximus's full-sized avatar
🎯
Focusing

raul flores jr rudimusmaximus

🎯
Focusing
View GitHub Profile
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>AllowClipboardAccess</key>
<true/>
<key>AppleAntiAliasingThreshold</key>
<integer>1</integer>
<key>ApplePressAndHoldEnabled</key>
<false/>
@rudimusmaximus
rudimusmaximus / classFreeSample.js
Last active February 16, 2021 16:10
GDG Lightning Talk 2020.06.11 Class Free code see comments for presentation link
/**
* 'class free' object constructor for a simple counter that counts up or down
*
* @param {Object} Spec - generic object for member destructuring-assignments
* @param {String} Spec.runBy - name of person using the constructor
* @returns {{up: Function, down: Function, toJSON: Function}}
*/
function counter_constructor(Spec) {
let {
runBy = 'John Doe', // default value if not specified
@rudimusmaximus
rudimusmaximus / cfg-install.sh
Last active January 25, 2024 23:09
Installs a bare repo into .cfg folder in home. The repo has my dot files for bash customizations. See repo for notes.
#!/bin/bash
echo "rudimusmaximus says, hi there. Creating bare repo clone of configDotFiles.git into $HOME/.cfg"
git clone --bare https://github.com/rudimusmaximus/configDotFiles.git $HOME/.cfg
function config {
/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME $@
}
mkdir -p .cfg-backup
config checkout
if [ $? = 0 ]; then
echo "Checked out config from bare clone of configDotFiles in $HOME/.cfg";
@rudimusmaximus
rudimusmaximus / cfg-install
Created January 9, 2020 02:04
Installs a bare repo into .cfg folder in home. The repo has my dot files for bash customizations. See repo for notes.
git clone --bare https://github.com/rudimusmaximus/configDotFiles.git $HOME/.cfg
function config {
/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME $@
}
mkdir -p .config-backup
config checkout
if [ $? = 0 ]; then
echo "Checked out config.";
else
echo "Backing up pre-existing dot files.";
@rudimusmaximus
rudimusmaximus / 60-jetbrains.conf
Created January 2, 2020 16:57 — forked from bittner/60-jetbrains.conf
Inotify configuration for IntelliJ IDEA (PhpStorm, PyCharm, RubyMine, WebStorm). Create this file with e.g. `sudo vim /etc/sysctl.d/60-jetbrains.conf`
# Set inotify watch limit high enough for IntelliJ IDEA (PhpStorm, PyCharm, RubyMine, WebStorm).
# Create this file as /etc/sysctl.d/60-jetbrains.conf (Debian, Ubuntu), and
# run `sudo service procps start` or reboot.
# Source: https://confluence.jetbrains.com/display/IDEADEV/Inotify+Watches+Limit
#
# More information resources:
# -$ man inotify # manpage
# -$ man sysctl.conf # manpage
# -$ cat /proc/sys/fs/inotify/max_user_watches # print current value in use
@rudimusmaximus
rudimusmaximus / submit.md
Created October 22, 2019 10:45 — forked from tanaikech/submit.md
Retrieving Values from Filtered Sheet in Spreadsheet using Google Apps Script

Retrieving Values from Filtered Sheet in Spreadsheet using Google Apps Script

This is a sample script for retrieving values from filtered Sheet in Spreadsheet using Google Apps Script. When the values are retrieved the filtered sheet by the basic filter, if setValues() and setDisplayValues() are used, all values without the filter are retrieved. In this script, I would like to introduce the method for retrieving the values from the filtered sheet using Google Apps Script.

In order to retrieve the values from the filtered sheet, one method has already been proposed. That method retrieved the values from the filtered sheet by retrieving columnMetadata and rowMetadata of the method of spreadsheet.get of Sheets API. In this case, the rows and columns hidden by the filter can be retrieved.

In this sample script, columnMetadata and rowMetadata of the method of spreadsheet.get of Sheets API are not used. The values are directly retrieved.

Spreadsheet

@rudimusmaximus
rudimusmaximus / Atom4GAS.md
Last active January 20, 2019 17:26
A setup for Atom GAS projects using DevFlow - WIP

Description

Working out an atom setup for my GAS work with DevFlow and work adventures. I like to setup on macOS and on Ubuntu running in Crouton on a Chromebook in developer mode.

Requirements

In an atom project, for *.gs, *.js, and *.ts files support:

  • nested namespacing autocomplete for the project
  • nested namespacing autocomplete for GAS basic and advanced services(?)
  • nice to have hover and hyperclick features
/**
* Takes a google maps api key and
* a json props object to generate
* a valid URL to a static map image.
* 
* @returns a valid URL to static map image
*/
function getStaticMap(key, props) {
 const markers = (props.markers || []).map(marker =&gt; 
@rudimusmaximus
rudimusmaximus / submit.md
Created April 23, 2018 19:34 — forked from tanaikech/submit.md
Benchmark: Loop for Array Processing using Google Apps Script

Benchmark: Loop for Array Processing using Google Apps Script

April 16, 2018

Kanshi Tanaike

Introduction

@rudimusmaximus
rudimusmaximus / explanation.md
Created April 7, 2018 18:09 — forked from masak/explanation.md
How is git commit sha1 formed

Ok, I geeked out, and this is probably more information than you need. But it completely answers the question. Sorry. ☺

Locally, I'm at this commit:

$ git show
commit d6cd1e2bd19e03a81132a23b2025920577f84e37
Author: jnthn <jnthn@jnthn.net>
Date:   Sun Apr 15 16:35:03 2012 +0200

When I added FIRST/NEXT/LAST, it was idiomatic but not quite so fast. This makes it faster. Another little bit of masak++'s program.