Skip to content

Instantly share code, notes, and snippets.

View ryanlane's full-sized avatar
🏠
Working from home

Ryan Lane ryanlane

🏠
Working from home
View GitHub Profile
#!/bin/bash
# List running screen sessions and extract session names
screen_list=$(screen -ls | awk '/[0-9]+\.[a-zA-Z0-9_-]+\t/ { print $1 }')
# Check if any sessions are running
if [[ -z $screen_list ]]; then
echo "No screen sessions are currently running."
exit 1
fi
@ryanlane
ryanlane / vscode.txt
Last active August 14, 2019 20:39
Visual Studio Code Extensions I Use
https://github.com/alex20465/vscode-aws-console
https://github.com/amandeepmittal/expressjs-vscode
https://github.com/ChristianKohler/NpmIntellisense
https://github.com/ChristianKohler/PathIntellisense
https://github.com/CodeZombieCH/vscode-gitignore
https://github.com/CoenraadS/BracketPair
https://github.com/dsznajder/vscode-es7-javascript-react-snippets
https://github.com/dthielking/aws-cloudformation-yaml
https://github.com/eamodio/vscode-gitlens
https://github.com/fabiospampinato/vscode-todo-plus
{
"editor.snippetSuggestions": "top",
"editor.renderWhitespace": "boundary",
"editor.cursorStyle": "line",
"editor.wordWrap": "on",
"editor.minimap.renderCharacters": false,
"editor.tabSize": 2,
"javascript.validate.enable": false,
"terminal.integrated.fontFamily": "Monaco",
"terminal.integrated.fontSize": 11,
@ryanlane
ryanlane / selected text
Last active January 11, 2018 21:54
show cursor position of selected text
Try both selecting text and typing.<br>
<textarea onselect="updateInfo(this)" onmousedown="updateInfo(this)" onkeydown="updateInfo(this)"></textarea><br><span id="info"></span>
<script>
function updateInfo(ele) {
var start = ele.selectionStart;
var end = ele.selectionEnd;
if (start!=end) {
document.getElementById("info").innerHTML = "The selection is between "+start+" and "+end+".";
@ryanlane
ryanlane / wireframe.jq.js
Created October 4, 2012 16:07
jQuery Wireframe plugin
(function ($) {
var placeholdertext = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum pulvinar risus nunc, nec posuere quam. Vivamus massa lacus, lobortis eget vehicula at, malesuada et enim. Vivamus condimentum justo quis orci tempor sed semper leo commodo. Fusce consectetur consequat felis non sodales. Pellentesque vitae lacus erat. Ut dignissim metus at tortor iaculis tincidunt sed suscipit metus. Nulla nec elit eu neque hendrerit tincidunt. Morbi eu laoreet lorem. In luctus diam a ligula semper eget condimentum leo rhoncus. Proin sagittis venenatis mauris, vel sagittis ligula sagittis blandit. Maecenas aliquam convallis ultrices. Maecenas tellus enim, fermentum vitae laoreet semper, aliquet a felis. Curabitur nec libero dolor. Aenean nec diam tortor. Donec nec diam nibh, et blandit erat. Cras facilisis tellus aliquam erat laoreet et laoreet dolor volutpat.";
var methods = {
init: function (options) {
//no init at this time.
//feature coming soon
@ryanlane
ryanlane / FolderMaker
Created August 16, 2012 22:12
Simple Command Line Numbered Folder Generator with C#
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace FolderMaker
{
class Program
@ryanlane
ryanlane / dabblet.css
Created February 5, 2012 01:13
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
min-height:100%;
background-color:#666;
background-image: radial-gradient(closest-side, transparent 98%, rgba(100,190,200,0.3) 99%),
radial-gradient(closest-side, transparent 98%, rgba(150,150,200,0.3) 99%);
background-size:10px 10px;
background-position:0 0, 5px 5px;
@ryanlane
ryanlane / dabblet.css
Created February 5, 2012 01:01
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
min-height:100%;
background-color:#8BA446;
background-image: radial-gradient(closest-side, transparent 98%, rgba(100,190,200,0.3) 99%),
radial-gradient(closest-side, transparent 98%, rgba(150,150,200,0.3) 99%);
background-size:10px 10px;
background-position:0 0, 5px 5px;