Skip to content

Instantly share code, notes, and snippets.

--tell application "Google Chrome"
-- set front_tab_url to URL of active tab of front window as text
--end tell
-- tell current application to set selection to front_tab_url
tell application "Google Chrome"
set the clipboard to URL of active tab of front window as text
end tell
@pbojinov
pbojinov / README.md
Last active June 24, 2024 05:39
Two way iframe communication- Check out working example here: http://pbojinov.github.io/iframe-communication/

Two way iframe communication

The main difference between the two pages is the method of sending messages. Recieving messages is the same in both.

Parent

Send messages to iframe using iframeEl.contentWindow.postMessage Recieve messages using window.addEventListener('message')

iframe

@staltz
staltz / introrx.md
Last active July 15, 2024 15:43
The introduction to Reactive Programming you've been missing
@arleym
arleym / layouts.alfredworkflow
Created February 28, 2016 13:37
Alfred Layout Alpha
on alfred_script(q)
tell application "Google Chrome" to activate -- needs to be in front
tell application "System Events" to tell application process "Chrome"
try
repeat with x from 1 to (count windows)
get properties of window x
set position of window x to {0, 21}
set size of window x to {1280, 709}
end repeat
end try
@mxstbr
mxstbr / Readme.md
Last active June 25, 2024 18:16
Enable tab completion for JSX with Emmet in Atom

Enable tab completion for JSX with Emmet in Atom

This guide assumes you have the emmet and language-babel packages already installed in Atom

Gif of the tab completion working

  1. Open the keymap.cson file by clicking on Atom -> Keymap… in the menu bar
  2. Add these lines of code to your keymap:
'atom-text-editor[data-grammar~="jsx"]:not([mini])':
@strickc
strickc / vsCodeVueESLint.md
Last active June 2, 2019 17:20
Configure VS Code for Vue.js component vue files for syntax highlighting and ESLint support within <script> tags
  1. Install ESLint VS Code extension

  2. Install Vue 2 Snippts VS Code extension

  3. Install eslint-plugin-html: npm install --save-dev eslint-plugin-html

  4. Add "plugins": ["html"] to eslintrc config file as per eslint-plugin-html instructions. Vue extension is enabled by default for the plugin.

  5. Open VS Code user settings and add vue to eslint.validate:

    "eslint.validate": [ "javascript", "javascriptreact", "vue" ]
    
@PatelUtkarsh
PatelUtkarsh / index.js
Last active January 14, 2020 06:01
Send pushbullet msg on website hit.
addEventListener('fetch', event => {
event.respondWith(handleRequest(event.request))
})
/**
* Respond to the request
* @param {Request} request
*/
async function handleRequest(request) {
@duluca
duluca / npm-scripts-for-docker.md
Last active April 8, 2024 09:52
npm scripts for Docker

These are generic npm scripts that you can copy & paste into your package.json file as-is and get access to convinience scripts to manage your Docker images all in one place.

How to Use

npm i -g mrm-task-npm-docker
npx mrm npm-docker

Contribute

Here's the code repository https://github.com/expertly-simple/mrm-task-npm-docker