This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo rm -fr /Library/Java/JavaVirtualMachines/jdk-9.jdk/ | |
sudo rm -fr /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin | |
sudo rm -fr /Library/PreferencePanes/JavaControlPanel.prefPane | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# KAFKA INSTALLER: | |
# downloads, un-tars, moves to $HOME/local, simlinks from full versioned name | |
# to kafka, exports into path in `.zshrc`, and then starts | |
# zookeeper and kafka server | |
brew install sbt # ensure sbt is installed first! | |
# current kafka for scala 2.12: http://apache.claz.org/kafka/0.10.2.0/kafka_2.12-0.10.2.0.tgz | |
SCALA_VERSION="2.12" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . | grep "Cargo.toml$" | # Find all cargo.toml files \ | |
sed 's#/[^/]*$##' | # Remove the filename leaving us with the directories containing cargo.toml files \ | |
xargs -L1 printf "cd \"%s\"; cargo clean; cd -\n" | # Print "cd path/to/crate; cargo clean; cd -" \ | |
bash # Execute |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[derive(Debug)] | |
struct TextEditor { | |
text: String, | |
} | |
impl TextEditor { | |
pub fn new(s: &'static str) -> Self { | |
TextEditor { text: String::from(s) } | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
python | |
import sys; | |
sys.path.append("/Users/chetanconikee/.multirust/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/etc") | |
print "Loading Rust Pretty Printers" | |
sys.path.insert(0, "/Users/chetanconikee/.multirust/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/etc") | |
import gdb_rust_pretty_printing | |
gdb_rust_pretty_printing.register_printers(gdb) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#![feature(core_intrinsics)] | |
fn print_type_of<T>(_: &T) -> () { | |
let type_name = | |
unsafe { | |
std::intrinsics::type_name::<T>() | |
}; | |
println!("{}", type_name); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#![allow(dead_code)] | |
#![allow(unused_variables)] | |
#[derive(Debug)] | |
struct Point<T> { | |
x:T,y:T | |
} | |
use std::ops::Add; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The #rustlang community is currently working to replace current toolchain manager | |
#Multirust (https://github.com/brson/multirust) with #Rustup (https://www.rustup.rs/) | |
Those wishing to replace #MultiRust with #RustUp, listed are steps in predefined order | |
1. Backup (and then) delete multirust and cargo folders from prior installation | |
curl -sf https://raw.githubusercontent.com/brson/multirust/master/quick-install.sh | sh -s -- --uninstall | |
rm -rf ~/.multirust | |
rm -rf ~/.cargo | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"math/big" | |
) | |
type BitSet struct { | |
bits big.Int | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gocode set package-lookup-mode "go" [or] gocode set package-lookup-mode "gb" | |
gocode set autobuild true | |
gocode close |