This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| activate application "iTerm" | |
| tell application "System Events" to tell application process "iTerm2" | |
| -- open the preferences or bring to front (window 1) | |
| keystroke "," using {command down} | |
| delay 0.1 | |
| -- Change to the General tab | |
| click button "Pointer" of toolbar 1 of window 1 | |
| delay 0.1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| tell application "Discord" to activate | |
| tell application "System Events" | |
| -- requires that you create a keyboard shortcut for cmd+shift+m | |
| keystroke "m" using {command down, shift down} | |
| keystroke tab using {command down} | |
| end tell |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- requires that "cmd+shift+m" is the keyboard shortcut for mute | |
| on run | |
| tell application "Discord" to activate | |
| tell application "System Events" | |
| -- toggle mute | |
| keystroke "m" using {command down, shift down} | |
| -- cmd+tab back to previous application | |
| keystroke tab using {command down} | |
| end tell | |
| end run |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Express } from 'express'; | |
| import path from 'path'; | |
| import webpack from 'webpack'; | |
| import webpackDevMiddleware from 'webpack-dev-middleware'; | |
| const webpackConfig = require('../../../frontend/webpack/webpack.dev.config'); | |
| export function addDevMiddlewares(app: Express) { | |
| const compiler = webpack(webpackConfig); | |
| const middleware = webpackDevMiddleware(compiler, { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // This will comment out any lines that begin with wordPattern in jsonMain.js and cssMain.js | |
| // jsonMain.js and cssMain.js moved to these locations in VSCode 1.22.1 | |
| sed -i -e "s/wordPattern/\/\/wordPattern/g" /Applications/Visual\ Studio\ Code.app/Contents/Resources/app/extensions/json-language-features/client/out/jsonMain.js | |
| sed -i -e "s/wordPattern/\/\/wordPattern/g" /Applications/Visual\ Studio\ Code.app/Contents/Resources/app/extensions/css-language-features/client/out/cssMain.js |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if application "Google Chrome" is running then | |
| tell application "Google Chrome" | |
| activate | |
| repeat with w in (windows) | |
| set j to 0 | |
| repeat with t in (tabs of w) | |
| set j to j + 1 | |
| tell t | |
| if URL starts with "http://www.youtube.com/watch" or URL starts with "https://www.youtube.com/watch" then | |
| set (active tab index of w) to j |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module: { | |
| rules: [ | |
| { | |
| test: /\.less$/, | |
| use: [ | |
| ...(process.env.NODE_ENV === 'production' | |
| ? [ | |
| { | |
| loader: MiniCssExtractPlugin.loader, | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [alias] | |
| # short hand | |
| co = checkout | |
| br = branch | |
| # short hand with some flags | |
| st = status -sb | |
| # reset all files | |
| nuke = reset --hard HEAD |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * This is a sample that connects Lambda with IFTTT Maker channel. The event is | |
| * sent in this format: <serialNumber>-<clickType>. | |
| * | |
| * The following JSON template shows what is sent as the payload: | |
| { | |
| "serialNumber": "GXXXXXXXXXXXXXXXXX", | |
| "batteryVoltage": "xxmV", | |
| "clickType": "SINGLE" | "DOUBLE" | "LONG" | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const https = require('https'); | |
| const querystring = require('querystring'); | |
| exports.handler = (event, context, callback) => { | |
| console.log('Received event:', event); | |
| const postData = querystring.stringify({}); | |
| const options = { | |
| hostname: 'my-glitch.glitch.me', |