Skip to content

Instantly share code, notes, and snippets.

View ar-to's full-sized avatar
🤔
scheming my next project

Ari ar-to

🤔
scheming my next project
View GitHub Profile
@ar-to
ar-to / OpenDevs_windows.cmd
Last active January 1, 2025 13:59
Batch script to automate opening urls, apps, and folders in Windows 10
@echo off
REM delete this line before using. The script below prints information, asks the user for confirmation before running the commands. Review commands and change to fit your needs and also your local username.
REM delete this line before using. This script require Git Bash for windows; see https://gist.github.com/ar-to/82fcaac189fff0cfb836a6922e542e9e
ECHO This is my auto OpenDevs batch script!
ECHO This batch script will open the following urls:Trello, Timelyapp, GitHub/ar-to, Slack, Wunderlist, Gitter, DevSource
ECHO This batch script will open the following apps:File Explorer(repos), Visual Studio Code, Git Bash(~),
ECHO system files (.bash_profile, .bashrc) are located in C:\Users\Ari\
@ar-to
ar-to / gulpfile.js
Last active March 5, 2022 02:28
My Gulp file example
var gulp = require('gulp');//main
var filter = require('gulp-filter');//filters files with globs
var pump = require('pump');//used only on uglify
var sass = require('gulp-sass');//using
var autoprefixer = require('gulp-autoprefixer');//using
var pug = require('gulp-pug');//using
var pugInheritance = require('gulp-pug-inheritance');//compile only changed files
var sourcemaps = require('gulp-sourcemaps');//using
var requirejsOptimize = require('gulp-requirejs-optimize');//using;optimizes modules individually & bundle (minify)
var path = require("path");//using for callback for pug task
@ar-to
ar-to / .vimrc
Last active November 13, 2017 22:25
This is the config file for setting up VIM as an IDE with Vundle as the plugin manage
""""Ari's Vimrc Config
set nocompatible
syntax on
set encoding=utf8 "defaults to Latin-1
"set nowrap "defaults to wrapping long lines
"""" Start Vundle config
" Disable file type for vundle
@ar-to
ar-to / vim-ide-setup.txt
Created October 6, 2017 08:12
This file goes step by step for setting up a vim IDE environment on Mac
Install Vundle
Visit source site: https://github.com/VundleVim/Vundle.vim
run:
$ git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
$ touch ~/.vimrc
$ vim ~/.vimrc
@ar-to
ar-to / .tmux.conf
Last active October 11, 2017 23:33
Sample tmux config file with package manager and instructions
#Instructions
# Install Tmux package manager: https://github.com/tmux-plugins/tpm
# Add plugins and their options
# Run: $ tmux
# prefix (Ctrl+b) I - to fetch plugin and source .tmux.conf or tmux source ~/tmux.conf
List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
@ar-to
ar-to / gems.txt
Created October 20, 2017 05:20
List of useful gems to install for development
$ gem install gem-name
teamocil : create tmux windows and panes http://www.teamocil.com
temuxinator : same as teamocil but allow custom path for each window and pane https://github.com/tmuxinator/tmuxinator
@ar-to
ar-to / gulpfile.js
Last active April 1, 2018 03:30
Gulpfile that watches for sass/js files and minifies them for production. Includes task for working with Bourbon (sass tool). Also has the package.json for installing dependancies. Tested!
var gulp = require('gulp');
var $ = require('gulp-load-plugins')();
var argv = require('yargs').argv;
var autoprefixer = require('gulp-autoprefixer');
var sourcemaps = require('gulp-sourcemaps');
var bourbon = require("bourbon").includePaths;
// Check for --production flag
var PRODUCTION = !!(argv.production);
@ar-to
ar-to / .bash_profile
Created October 12, 2018 18:58
Useful scripts for .bash_profile on OSX
#Below is a function to add current git branch name to bash prompt
#It also changes default setting of \h:\W \u\$
#source: https://coderwall.com/p/fasnya/add-git-branch-name-to-bash-prompt
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
export PS1="\u@\h \[\033[32m\]\w\[\033[33m\]\$(parse_git_branch)\[\033[00m\] $ "
#The following functions are used to run git push origin w/branch w/o parenthesis as used in the ps1 prompt
@ar-to
ar-to / mock-window-property.ts
Last active November 6, 2021 07:21
Mock localStorage for jest
/**
* Build Local Storage object
* @see https://www.codeblocq.com/2021/01/Jest-Mock-Local-Storage/ for source
* @see https://stackoverflow.com/a/32911774/9270352 for source
* @returns
*/
export const fakeLocalStorage = () => {
let store: { [key: string]: string } = {}
return {
@ar-to
ar-to / vscode_extensions.sh
Last active December 14, 2021 22:59
script to help speed up commonly used vscode extensions. More added regularly...
#!/usr/bin/env bash
# TODO:
# - create methods for specific groups and maybe turn this into a CLI tool
# Print list of extensions ready to copy/paste and install
#code --list-extensions | xargs -L 1 echo code --install-extension
# Project Managing
code --install-extension alefragnani.project-manager