Skip to content

Instantly share code, notes, and snippets.

@Petesta
Petesta / nerdtree.vim
Last active December 31, 2015 23:39
NerdTree Configurations
autocmd VimEnter * if &filetype !=# "haskell" | NERDTree | endif
" If you want to add other files it would be (if &filetype !=# "haskell" && &filetype !=# "python")
let NERDTreeIgnore = ["\.pyc$"]
" If you want to add .class and other files just concatenate like so ["\.pyc$"] + ["\.class$"] or ["\.pyc$", "\.class$"]
@Petesta
Petesta / footer.html
Last active August 29, 2015 14:01
How to make a stick footer in css.
@Petesta
Petesta / build.sbt
Last active August 29, 2015 14:07
Deploying Java Based Application
import com.typesafe.sbt.SbtStartScript
import AssemblyKeys._
assemblySettings
seq(SbtStartScript.startScriptForClassesSettings: _*)
SbtStartScript.stage in Compile := Unit
libraryDependencies ++= Seq(
@Petesta
Petesta / parallel_tests.sh
Last active August 29, 2015 14:14
Run parallel_tests locally
ruby -Itest -e 'ROOT_DIR="/Users/Pete/Documents/web";["../../.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/parallel_tests-899555d6a25a/lib/parallel_tests/test/test_unit_filename.rb", "test/functional/advertisers_controller_test.rb", "test/functional/affiliate_campaigns_controller_test.rb", "test/functional/api/json/advertisers_api_controller_test.rb", "test/functional/api/json/network_integration_api_controller_test.rb", "test/functional/api/xml/affiliate_campaigns_api_controller_test.rb", "test/functional/ctc_controller_test.rb", "test/functional/default_cookie_domain_test.rb", "test/functional/help_controller_test.rb", "test/functional/layout/application_header_test.rb", "test/functional/platform_controller_test.rb", "test/functional/tracked_actions_controller_test.rb", "test/functional/voice_talents_controller_test.rb", "test/helpers/advertiser_campaigns_helper_test.rb", "test/integration/api_routes/affiliate_campaigns_api_routes_test.rb", "test/integration/api_routes/promo_numbers_api_routes_test
#include <iostream>
using namespace std;
class Point {
public:
int _x;
int _y;
'this %{x} is formatted' % {x: 'string'}
@Petesta
Petesta / git-upstream.sh
Last active July 29, 2019 21:06
Only push branch you're on be default
# Only push the branch that you're on by default
git config --global push.default upstream
#[derive(Debug)]
struct BPM(u32);
impl BPM {
fn scale(&self, scale: f32) -> BPM {
BPM(0)
}
}
fn main() {
" Ex. This is what the call would look like on the command line
" sbt 'test-only test.ApplicationSpec'
function! SBTTestOnly()
let b:current_filename = split(split(@%, '/')[1], '\.')[0]
let b:sbt = ":Dispatch sbt 'test-only test.".b:current_filename."'"
execute b:sbt
endfunction
command! -nargs=0 SBT :call SBTTestOnly()
@Petesta
Petesta / Build.scala
Last active September 5, 2015 01:06
import sbt._
import Keys._
object BuildSettings {
val buildSettings = Seq(
scalaVersion := "2.11.4",
scalacOptions += "",
resolvers += Resolver.sonatypeRepo("snapshots"),
resolvers += Resolver.sonatypeRepo("releases")
)