Skip to content

Instantly share code, notes, and snippets.

View ArtemBernatskyy's full-sized avatar

Artem Bernatskyy ArtemBernatskyy

  • World
View GitHub Profile
@samhenrigold
samhenrigold / De-dobe.scpt
Last active February 8, 2024 09:33
Kill all Adobe CC daemons on app quit
-- Original script by Ted Wrigley (https://stackoverflow.com/questions/63786497/is-it-possible-to-run-an-automator-workflow-when-a-program-exits/69959340#69959340)
use framework "AppKit"
use scripting additions
property NSWorkspace : class "NSWorkspace"
property whitelist : {"com.adobe.ARM", "com.adobe.Acrobat", "com.adobe.Acrobat.Pro", "com.adobe.AdobePremierePro", "com.adobe.AfterEffects", "com.adobe.InCopy", "com.adobe.InDesign", "com.adobe.InDesignServer", "com.adobe.Lightroom2", "com.adobe.Lightroom3", "com.adobe.Muse.application", "com.adobe.Photoshop", "com.adobe.PhotoshopElements", "com.adobe.Reader", "com.adobe.bridge3", "com.adobe.bridge4", "com.adobe.bridge4.1", "com.adobe.dreamweaver-15.0", "com.adobe.dreamweaver-15.1", "com.adobe.dreamweaver-16.0", "com.adobe.dreamweaver-16.1", "com.adobe.estoolkit-3.0", "com.adobe.estoolkit-3.5", "com.adobe.estoolkit-3.6", "com.adobe.flash", "com.adobe.illustrator", "com.adobe.photodownloader", "com.adobe.pse11editor", "com.adobe.pse12editor", "com.adobe.pse9ed
@alexeiz
alexeiz / desktop_activity.py
Created April 13, 2018 02:45
Simulate desktop activity
#!/usr/bin/env python
import sys
import pyautogui
from datetime import datetime, timedelta
def move_rel(dx, dy, dur):
pyautogui.moveRel(dx, dy, dur, pyautogui.easeInQuad)
def square(side, dur):
@jpierson
jpierson / switch-local-git-repo-to-fork.md
Last active December 26, 2022 21:48 — forked from jagregory/gist:710671
How to move to a fork after cloning

If you are like me you find yourself cloning a repo, making some proposed changes and then deciding to later contributing back using the GitHub Flow convention. Below is a set of instructions I've developed for myself on how to deal with this scenario and an explanation of why it matters based on jagregory's gist.

To follow GitHub flow you should really have created a fork initially as a public representation of the forked repository and the clone that instead. My understanding is that the typical setup would have your local repository pointing to your fork as origin and the original forked repository as upstream so that you can use these keywords in other git commands.

  1. Clone some repo (you've probably already done this step)

    git clone git@github...some-repo.git
@A-gambit
A-gambit / REACTIVE2016-LIGHTNING-PROPOSAL.md
Last active February 22, 2024 18:24
Proposal for lightning talk at ReactiveConf 2016: Road from UndefinedLand

Proposal for a lightning talk at the Reactive 2016.

Keep calm and like/retweet it on Twitter and star this Gist to vote on this talk.

Road from UndefinedLand

Undefiend

I work at Grammarly. We like React and happily use it in our applications. However, sometimes something goes wrong and bugs creep into the code. Here comes testing. It helps make us confident about the quality of our code.

@krambertech
krambertech / Component.jsx
Created July 2, 2016 10:44
ReactJS: Input fire onChange when user stopped typing (or pressed Enter key)
import React, { Component } from 'react';
import TextField from 'components/base/TextField';
const WAIT_INTERVAL = 1000;
const ENTER_KEY = 13;
export default class TextSearch extends Component {
constructor(props) {
super();
@luizventurote
luizventurote / vagrant-reassociate.md
Last active July 26, 2017 02:04
Re-associate a Vagrant project directory with an existing VirtualBox VM
  • Use VBoxManage list vms to get VM id
  • Open folder .vagrant/machines/default/virtualbox
  • Set the new ID on files action_provision and id
  • Remove SSH connection on Vagrantfile
config.ssh.insert_key = false
config.ssh.username = 'vagrant'
config.ssh.password = 'vagrant'
@fmasuhr
fmasuhr / gist:4fd661b884f157590613
Last active June 27, 2022 03:25
Associate a Vagrant project directory with an existing VirtualBox VM
  1. Run the following command and copy the ID of your VM
VBoxManage list vms
=> "virtualMachine" {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}
  1. Go to the Vagrant project configuration folder
@x3rAx
x3rAx / .gitignore
Created August 6, 2015 20:36
Gitignore with .gitkeep
# +----------------------------+
# | IDE files |
# +----------------------------+
/.idea
# +----------------------------+
# | Vagrant |
# +----------------------------+
/.vagrant
@JeffBelback
JeffBelback / docker-destroy-all.sh
Last active December 12, 2023 17:47
Destroy all Docker Containers and Images
#!/bin/bash
# Stop all containers
containers=`docker ps -a -q`
if [ -n "$containers" ] ; then
docker stop $containers
fi
# Delete all containers
containers=`docker ps -a -q`
if [ -n "$containers" ]; then
docker rm -f -v $containers
@mathebox
mathebox / color_conversion.py
Created April 12, 2015 16:47
Python methods to convert colors between RGB, HSV and HSL
import math
def rgb_to_hsv(r, g, b):
r = float(r)
g = float(g)
b = float(b)
high = max(r, g, b)
low = min(r, g, b)
h, s, v = high, high, high