Skip to content

Instantly share code, notes, and snippets.

👾

Justin Smestad jsmestad

👾
Block or report user

Report or block jsmestad

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jsmestad
jsmestad / Setup GCC and CLANG Toolchains.md
Last active Aug 28, 2019 — forked from bhaskarvk/Setup GCC and CLANG Toolchains.md
Proper GCC (vers. 5/6/7) & LLVM/CLANG (vers. 4/5) Toolchain Setup on Ubuntu/Linux Mint
View Setup GCC and CLANG Toolchains.md

This approach uses update-alternatives to manage GCC and LLVM/CLANG C/C++ compiler toolchains. Although tested on Linux Mint 18.3, this approach should work on any Debian based distro or for that matter any Linux distro with update-alternatives support, provided the packages are installed correctly.

There are 3 files

  • gcc-alternatives.sh installs GCC versions 5/6/7 and sets up alternatives for gcc/g++/cpp/gfortran.
  • llvm-clang-alternatives.sh installs LLVM and CLANG versions 4/5 and sets up alternatives for various LLVM and CLANG programs including clang and clang++.
  • cc-alternatives.sh sets up alternatives for the cc, cxx, and the ld commands. This script can be used to change systemwide default compiler/linker combination to either GCC or CLANG.

Once these scripts are run you can change the system GCC/CLANG versions by running sudo update-alternatives --config gcc|clang. To change the default compiler/linker combo used by t

View keybase.md

Keybase proof

I hereby claim:

  • I am jsmestad on github.
  • I am jstad (https://keybase.io/jstad) on keybase.
  • I have a public key ASBO_saBFticZhgeKvYiOJDU4NnS-kUqcj4Y1USPbKShCgo

To claim this, I am signing this object:

@jsmestad
jsmestad / smartparens-cheatsheet.md
Created Sep 9, 2018 — forked from pvik/smartparens-cheatsheet.md
A Cheatsheet for Emacs Smarparens example configuration
View smartparens-cheatsheet.md

An animated cheatsheet for smartparens using the example configuration specified here by the smartparens author. Inspired by this tutorial for paredit.

Traversal

C-M-f sp-forward-sexp
C-M-b sp-backward-sexp
View .rubocop.yml
AllCops:
TargetRubyVersion: 2.4
#################### Lint ##################################
### Warnings
Lint/AmbiguousBlockAssociation:
Description: >-
Checks for ambiguous block association with method when param passed without
parentheses.
View settings.json
{
"workbench.colorTheme": "Spacemacs - light",
"vim.disableAnnoyingNeovimMessage": true,
"editor.fontFamily": "Hack, Menlo, Monaco, 'Courier New', monospace",
"editor.fontSize": 14,
"editor.tabSize": 2,
"[json]": {
},
"[javascript]": {
@jsmestad
jsmestad / ruby-mode-revised.patch
Last active Apr 24, 2017
Modified ruby-mode.el to provide more vim-like highlighting
View ruby-mode-revised.patch
--- ruby-mode.el 2017-04-23 19:47:09.000000000 -0600
+++ ruby-mode-revised.el 2017-04-23 19:47:27.000000000 -0600
@@ -349,6 +349,18 @@
"Use `ruby-encoding-map' to set encoding magic comment if this is non-nil."
:type 'boolean :group 'ruby)
+(defvar ruby-symbol-face 'ruby-symbol-face)
+(defface ruby-symbol-face
+ '((t (:inherit ruby-constant-face)))
+ "Syntax highlighting for Ruby symbol."
View .spacemacs
;; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Configuration Layers declaration.
You should not put any user code in this function besides modifying the variable
values."
(setq-default
;; Base distribution to use. This is a layer contained in the directory
View murilasso.zsh-theme
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
local user_host='%{$terminfo[bold]$fg[green]%}%n@%m%{$reset_color%}'
local current_dir='%{$terminfo[bold]$fg[blue]%}%~%{$reset_color%}'
local ruby_version='%{$fg[red]%}$(rbenv_prompt_info)%{$reset_color%}'
local git_branch='%{$fg[blue]%}$(git_prompt_info)%{$reset_color%}'
PROMPT="${user_host}:${current_dir} ${ruby_version}
${git_branch} %B$%b "
RPS1="${return_code}"
View gist:bd187dfd6c8f1118021c
import { moduleForModel, test } from 'ember-qunit';
moduleForModel('item', 'Unit | Model | item', {
// Specify the other units that are required for this test.
needs: []
});
test('it exists', function(assert) {
let model = this.subject();
// let store = this.store();
View index.hbs
<ul>
{{#each model as |item|}}
<li>{{item.uri}}</li>
{{/each}}
</ul>
{{input type='text'
class='new-item'
placeholder='What would you like to share?'
value=newTitle
You can’t perform that action at this time.