Skip to content

Instantly share code, notes, and snippets.

View Blumed's full-sized avatar

Cullan Blumed

View GitHub Profile
@Blumed
Blumed / .inputrc
Created April 5, 2017 13:38
Script allows you to search history for a particular process or app instead of the entire line.
"\e[A": history-search-backward
"\e[B": history-search-forward
set show-all-if-ambiguous on
set completion-ignore-case on
@Blumed
Blumed / filelist.sh
Last active March 26, 2017 00:47
A bash function that takes file extensions as arguments. You may pass as many as you want and output each file name matching your extension into a file so you can copy and past from it quickly or share your custom file list
filelist() {
if [ $# -gt 0 ]; then
shopt -s nullglob
for ext in "$@"; do
printf '%s\n' *.$ext
done | pbcopy
echo "copied listing for $@ files to clipboard"
else
shopt -s nullglob
@Blumed
Blumed / scss.json
Created March 6, 2017 06:31
Visual Studio Code Snippet - Bootstrap3 Media Query
"BS3 Media Query Snippet": {
"prefix": "bs-media",
"body": [
"@media ($minMax-width: \\$screen-$xsSmMdLg-$minMax) {\n\t$0\n}"
],
"description": "BS3 MediaQuery"
},
"BS3 Media Query Self Only Snippet ": {
"prefix": "bs-media-only",
"body": [
@Blumed
Blumed / snippets.dash
Last active January 29, 2017 17:38
Dash: Snippets
//-------------------------------
// Meeting formatting for Harvest
//-------------------------------
bld`
@cursor__JRIA TICKET/STORY NAME__ [bld]: __Development task as apart of your sprint__
int`
@cursor__JRIA TICKET/STORY NAME__ [int]: __Development task required to support the backend team__
@Blumed
Blumed / 0_reuse_code.js
Created August 2, 2016 15:55
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@Blumed
Blumed / base64.sh
Last active March 15, 2017 15:08
Bash: Base64 CLI
#Original Script found here @puppybits https://gist.github.com/puppybits/1565441
# Example
# bas64 file.png creates the string with the needed data:image/png;base64, appended to the front of the string and copies it to your clipboard
# bas64 file.png -img does the same as above but adds an image tag around the string so all you need to do is paste into your html file
bas64(){
filename=$(basename $1)
ext=${filename##*.}
if [ $ext == gif ]; then
append="data:image/gif;base64,";
elif [ $ext == jpeg ] || [ $ext == jpg ]; then
@Blumed
Blumed / user-pref.sh
Last active January 24, 2017 13:38
Bash: Create a centralized Sublime Text User Preference
#-----------------------------------------------------
# Sublime Text 3 - Syncing User Prefrences
#-----------------------------------------------------
#Put these snippets inside your .bash_profile
#Call this snippet on your first computer
sublimeOrigin() {
cd ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/
mkdir ~/Dropbox/Sublime
@Blumed
Blumed / inline-dividers.scss
Last active January 24, 2017 13:31
CSS: Inline links/text with dividers
//Inline Divides
//------------------------
.is-inline {
font-size: 0;
}
.is-inline > * {
display: inline-block;
position: relative;
}
@Blumed
Blumed / regexSvg.sh
Last active February 8, 2016 21:39
Regex Svg Cleaning
# In sublime text must turn on regex and case sensativity.
#Grabs all attributes that start with sketch until last second qoute.
\ssketch.[^"]*(["'])(?:(?=(\\?))\2.)*?\1
#Grabs all attributes that start with font-weight until last second qoute.
\sfont-w.[^"]*(["'])(?:(?=(\\?))\2.)*?\1
#Grabs def,desc,title,svg tags and comments
(?=(<def)|(<desc)|(<title)|(<\!)|(<svg)|(<\/svg)|(<\?)).+
@Blumed
Blumed / social.sh
Last active January 19, 2016 08:40
Use gulp, and jekyll? me too. I made a handy an automated process for social post images.
#!/bin/bash
cd src/assets/images/social/uncompressed #change directory to exicute script in uncompressed folder
mkdir .tmp #making temp derectory
cp * .tmp/
mogrify -format jpg -filter Triangle -define filter:support=2 -thumbnail 1200x630! -quality 100 -unsharp 0.25x0.08+8.3+0.045 -dither None -define jpeg:fancy-upsampling=off -interlace none -colorspace sRGB -path .tmp/ .tmp/*.*
mv .tmp/*.jpg .tmp/../../og/; rm -R .tmp/*;
cp * .tmp/