Skip to content

Instantly share code, notes, and snippets.

@jethroo
jethroo / simple curl load test
Created Feb 18, 2020
simple curl load test
View simple curl load test
#!/bin/bash
curling(){
echo "curling" $1
curl <whatever you want to curl>
}
# For loop 50 times
for i in {1..50}
do
View jethroo.zsh-theme
function ruby_v() {
if [ -n "$(ls -A ./Gemfile 2>/dev/null)" ]
then
echo "${$(ruby_prompt_info)/ruby-/ }"
fi
}
function fg_c_code() {
echo "\\033[38;5;$1m"
}
View bricklink_new_and_used_inv_part_link
View .bashrc
COLUMNS=250
NORMAL="\[\033[00m\]"
YELLOW="\[\033[33m\]"
RED="\[\033[31m\]"
function parse_git_dirty {
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit, working tree clean" ]] && echo "⚡️"
}
@jethroo
jethroo / app.js
Created Feb 15, 2017 — forked from davidkpiano/app.js
Simple way to namespace React components
View app.js
import React from 'react';
import * as My from './components/my-components.js';
export default class App extends React.Component {
render() {
return (
<div>
<My.Foo />
<My.Bar />
@jethroo
jethroo / tz_identifiers_to_rails_identifiers.rb
Created Jun 29, 2016 — forked from jpmckinney/tz_identifiers_to_rails_identifiers.rb
Maps tz database time zone identifiers to Rails time zone identifiers
View tz_identifiers_to_rails_identifiers.rb
# blog post: http://blog.slashpoundbang.com/post/2613268281/changing-from-tz-database-identifiers-to-rails-friendly
{
"Australia/Adelaide" => "Adelaide",
"Australia/Broken_Hill" => "Adelaide",
"America/Anchorage" => "Alaska",
"America/Juneau" => "Alaska",
"America/Nome" => "Alaska",
"America/Yakutat" => "Alaska",
"Pacific/Gambier" => "Alaska",
"Asia/Almaty" => "Almaty",
@jethroo
jethroo / autocomplete.html
Created May 24, 2016 — forked from hernan/autocomplete.html
jquery autocomplete demo with custom render item implementation
View autocomplete.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Autocomplete - Custom data and display</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.6.2.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
@jethroo
jethroo / disable_angular_debug_info
Created May 4, 2016
Improving Angular performance with 1 line of code
View disable_angular_debug_info
myApp.config(['$compileProvider', function ($compileProvider) {
$compileProvider.debugInfoEnabled(false);
}]);
https://medium.com/@hackupstate/improving-angular-performance-with-1-line-of-code-a1fb814a6476#.j1tip7ulc
View rename_css_scss
#!/bin/sh
for file in $(find ./app/assets/stylesheets/ -name "*.css.scss")
do
git mv $file `echo $file | sed s/\.css//`
done
View mac os x say for rspec
say -v Cellos Ar-rr-rr-rr-rr-rr-rr-rr-rr-rr-rr-rr-spec is done
say -v Cellos dong dong dong ding ding ding dong Spec is done Spec is donne
say -v Daniel RSpec is done, Mi Lord
You can’t perform that action at this time.