Skip to content

Instantly share code, notes, and snippets.

#[derive(Debug)]
struct BPM(u32);
impl BPM {
fn scale(&self, scale: f32) -> BPM {
BPM(0)
}
}
fn main() {
@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
'this %{x} is formatted' % {x: 'string'}
#include <iostream>
using namespace std;
class Point {
public:
int _x;
int _y;
@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
@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 / footer.html
Last active August 29, 2015 14:01
How to make a stick footer in css.
@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$"]