Skip to content

Instantly share code, notes, and snippets.

View scottwarren's full-sized avatar

Scott Warren scottwarren

View GitHub Profile
@scottwarren
scottwarren / keybindings.jsonc
Created April 23, 2025 11:06
Settings to disable auto suggestions for GitHub Copilot (and rebind the trigger key)
// ~/Library/Application Support/Code/User/keybindings.json
[
{
// According to ChatGPT CapsLock isn't bindable by default in VSCode, so if you want to use it
// The suggestion is to use something like Karabiner Elements to rebind your caps lock key to something like F20
// and then bind it to trigger this
// Although the docs seem to suggest it is possible to bind: https://code.visualstudio.com/docs/configure/keybindings
"key": "cmd+enter",
"command": "github.copilot.generate",
@scottwarren
scottwarren / example_file.js
Created August 4, 2019 11:00
Cool description
export default function getFullName(firstName, lastName) {
return `${firstName} ${lastName}`
}
@scottwarren
scottwarren / 0_reuse_code.js
Last active August 31, 2015 03:53
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
@scottwarren
scottwarren / var_dump.sublime-snippet
Created April 29, 2015 01:13
Sublime Snippet for var_dump(); die; "debugging" for PHP
<snippet>
<content><![CDATA[
var_dump($1);
die;
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>var_dump</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.php</scope>
</snippet>
@scottwarren
scottwarren / merge-base.sh
Last active August 29, 2015 14:19
Merge the main development branch into your feature branch
##
# merges a branch into current branch to keep up to date with the base (default master)
# usage: be-merge [branch]
# Make sure you are on the right branch before you run this command
#
function merge-base() {
git checkout ${1-master}
git pull
git checkout -
git merge ${1-master}
@scottwarren
scottwarren / todo.md
Last active August 29, 2015 14:17
todo
  • phpstorm
  • sublime
  • mutate
  • Printer
  • Vagrant box
  • Macbuntu
  • ZSH Plugins (oh my sh)
  • [ ]
@scottwarren
scottwarren / pigLatin.js
Created December 31, 2014 02:31
Convert an English word into Pig Latin written in Javascript
function pigLatin(englishWord) {
return englishWord.substr(1, englishWord.length) + englishWord.substr(0, 1) + 'ay';
};
// example: console.log(pigLatin('Hello'));
@scottwarren
scottwarren / list.md
Last active August 29, 2015 13:57
Helpful HTML/CSS Snippets
2014-02-14 00:20:44,222 INFO [sessionId=] [requestId=] [main]: Version - Hibernate Commons Annotations 3.2.0.Final
2014-02-14 00:20:44,227 INFO [sessionId=] [requestId=] [main]: Environment - Hibernate 3.6.0.Final
2014-02-14 00:20:44,229 INFO [sessionId=] [requestId=] [main]: Environment - hibernate.properties not found
2014-02-14 00:20:44,231 INFO [sessionId=] [requestId=] [main]: Environment - Bytecode provider name : javassist
2014-02-14 00:20:44,236 INFO [sessionId=] [requestId=] [main]: Environment - using JDK 1.4 java.sql.Timestamp handling
2014-02-14 00:20:44,288 INFO [sessionId=] [requestId=] [main]: Version - Hibernate EntityManager 3.6.0.Final
2014-02-14 00:20:44,301 INFO [sessionId=] [requestId=] [main]: Ejb3Configuration - Processing PersistenceUnitInfo [
name: persistenceUnit
...]
2014-02-14 00:20:44,649 INFO [sessionId=] [requestId=] [main]: AnnotationBinder - Binding entity from annotated class: net.flitech.altitude.cobra.model.jpa.Interface
@scottwarren
scottwarren / yolo.swag.js
Last active August 29, 2015 13:56
example of .call method
var model = {
departureLocation: {
port: 'Some Port',
city: 'Tokyo',
country: 'Japan'
},
arrivalLocation: {
post: 'Main Port',
city: 'Seattle',
country: 'United States'