Skip to content

Instantly share code, notes, and snippets.

View elovlein's full-sized avatar

Erik Love elovlein

  • Las Vegas, NV
  • 09:58 (UTC -12:00)
View GitHub Profile
@varontron
varontron / outlookEventToNotion.scpt
Last active January 19, 2023 23:20
Applescript to copy and format selected outlook event data to "MergeCSV" in Notion
property MY_NOTION_TOKEN : "redacted"
property MTG_DATABASE_ID : "redacted"
tell application "Microsoft Outlook"
-- is an evet selected in the calendar window?
if class of front window is main window and view of front window is calendar view then
set theEvt to the selection
-- is the event unsaved or is the buggy "New Outlook" interface being used
else if class of front window is window and object of front window is missing value then
display dialog "Unsaved events cannot be copied. Save your event and run this script again." with title "Alert!" with icon 2 buttons {"OK"} default button {"OK"}
@kmpm
kmpm / bionic-playbook.yml
Created April 9, 2019 11:24
Ansible playbook for ubuntu bionic
---
# ubuntu bionic development server playbook
- hosts: all
vars:
ansible_python_interpreter: "python3"
tasks:
- name: disable DNSSEC
become: yes
lineinfile:
@palpen
palpen / create_new_outlook_meeting.scpt
Created March 28, 2019 15:20
Create a new meeting in Outlook using AppleScript
tell application "Microsoft Outlook"
activate
-- Set exchange account
set myAccount to exchange account 1
-- Encode dates for meeting
set mtgStart to date "Thursday, April 4, 2019 at 2:40:00 PM"
set mtgEnd to date "Thursday, April 4, 2019 at 3:25:00 PM"
@h0bbel
h0bbel / sources.list
Last active February 20, 2026 19:01
/etc/apt/sources.list for Ubuntu 18.04.1 LTS Bionic Beaver
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us.archive.ubuntu.com/ubuntu/ bionic main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
@jrichardsz
jrichardsz / disable_requiretty.md
Last active May 1, 2023 00:00
Disable requiretty in /etc/sudoers

Disable requiretty in /etc/sudoers

requiretty setting is enabled in almost every linux systems by defaults. Enable requiretty will cause cron, scripts or process do not get tty session.

requiretty

If set, sudo will only run when the user is logged in to a real tty. When this flag is set, sudo can only be run from a login session and not via other means such as cron(8) or cgi-bin scripts. This flag is off by default.

Besides that, if you encounter error syntax like this:-

@bvaughn
bvaughn / index.md
Last active September 8, 2025 00:55
How to use profiling in production mode for react-dom

React recently introduced an experimental profiler API. This page gives instructions on how to use this API in a production release of your app.

Table of Contents

Profiling in production

React DOM automatically supports profiling in development mode for v16.5+, but since profiling adds some small additional overhead it is opt-in for production mode. This gist explains how to opt-in.

@pmkay
pmkay / top-brew-packages.txt
Last active March 6, 2026 06:42 — forked from r5v9/top-brew-packages.txt
Top homebrew packages
node: Platform built on V8 to build network applications
git: Distributed revision control system
wget: Internet file retriever
yarn: JavaScript package manager
python3: Interpreted, interactive, object-oriented programming language
coreutils: GNU File, Shell, and Text utilities
pkg-config: Manage compile and link flags for libraries
chromedriver: Tool for automated testing of webapps across many browsers
awscli: Official Amazon AWS command-line interface
automake: Tool for generating GNU Standards-compliant Makefiles
@satendra02
satendra02 / app.DockerFile
Last active November 19, 2024 17:28
docker+rails+puma+nginx+postgres (Production ready)
FROM ruby:2.3.1
# Install dependencies
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs
# Set an environment variable where the Rails app is installed to inside of Docker image:
ENV RAILS_ROOT /var/www/app_name
RUN mkdir -p $RAILS_ROOT
# Set working directory, where the commands will be ran:
@dataduke
dataduke / Maps.java
Last active October 11, 2023 19:41
Flatten a nested Map
import java.util.Map;
import java.util.stream.Collectors;
import java.util.stream.Stream;
public class Maps {
public static Map<String, Object> asFlattendMap(Map<String, Object> map) {
return map.entrySet().stream()
.flatMap(Maps::flatten)
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
@R3V1Z3
R3V1Z3 / alexa-cheats.md
Last active January 10, 2025 02:40
The ultimate cheatsheet for Amazon Alexa. See https://ugotsta.github.io/alexa-cheats/

Alexa Cheats

Commands, questions and easter eggs for Amazon Alexa enabled devices: https://ugotsta.github.io/alexa-cheats/

General

  • "Alexa, stop."
  • "Alexa, volume one/six/ten."
  • "Alexa, turn up/down the bass/treble."
  • "Alexa, mute."
  • "Alexa, unmute."
  • "Alexa, repeat."