Skip to content

Instantly share code, notes, and snippets.

View discrete-fput.py
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.animation as animation
__version__ = '1.0'
print(__doc__)
print('version:', __version__)
# FUNCTION DEFINITION
@rust-play
rust-play / playground.rs
Created Oct 14, 2019
Code shared from the Rust Playground
View playground.rs
#[wasm_bindgen]
pub extern fn handle_mouse_down(img_width: u32, img_height: u32, canvas_width: u32, canvas_height: u32, x: u32, y: u32, img_vec: Vec<u8>)
-> Vec<u8>
{
utils::set_panic_hook();
log!("INSIDE HANDLE_MOUSE_DOWN");
log!("inside handle_mouse_down and x: {:?}, and y: {:?}", x, y);
log!("1");
let mutex_var = &ID_TO_DATA;
@R-Men
R-Men / minecraftServerLaunch.py
Created Oct 14, 2019
Minecraft server launch python script
View minecraftServerLaunch.py
#!/usr/bin/env python
import os
import sys
u_id = 1000
ram = "8"
minimum_ram = "8"
screen_name = "FaFIndustriesMinecraftServer"
java_app_name = "spigot-1.13.2"
View bash_profile
export CLICOLOR=1
export LSCOLORS=GxFxCxDxBxegedabagaced
export PS1="\[\033[01;36m\]\w\[\033[00m\] "
alias ls='ls -l'
alias finder='open -a Finder ./'
alias composer="php /usr/local/bin/composer.phar"
alias desktop="cd ~/desktop"
alias work="cd ~/work"
View untrusted-lvl9-solution.js
/**********************
* fordingTheRiver.js *
**********************
*
* And there's the river. Fortunately, I was prepared for this.
* See the raft on the other side?
*
* Everything is going according to plan.
*/
View untrusted-lvl12-solution.js
/*
* robotNav.js
*
* The green key is located in a slightly more
* complicated room. You'll need to get the robot
* past these obstacles.
*/
function startLevel(map) {
// Hint: you can press R or 5 to "rest" and not move the
View Excercise5.py
print("Pairs that sum to 5:")
for i in range(1, 6):
for j in range(1, 6):
if i + j == 5:
print("(", i, ",", j, ")")
@jennjwill
jennjwill / gist:43e124d102f1f337ba8ef7afa385eb0d
Created Oct 14, 2019
wiki specs test failures plus morgan routing details above
View gist:43e124d102f1f337ba8ef7afa385eb0d
npm test
> blocipedia-node@1.0.0 test C:\Users\Willz\bloc\blocipedia-node
> set NODE_ENV=test&& jasmine
Started
server is listening for requests on port 3000
GET / 200 13.726 ms - 2933
.GET /users/sign_up 200 3.016 ms - 3298
.POST /users/sign_up 302 204.943 ms - 23
@artemaminov
artemaminov / order_decorator.rb
Last active Oct 14, 2019
Spree decorator validation
View order_decorator.rb
module Weflydrones
module OrderDecorator
def self.prepended(base)
base.instance_eval { self.validate :contains_products_from_only_one_seller }
end
private
def contains_products_from_only_one_seller
sellers = products.collect { |product| product.vendor_id }.uniq
@HugsLibRecordKeeper
HugsLibRecordKeeper / output_log.txt
Created Oct 14, 2019
Rimworld output log published using HugsLib
View output_log.txt
Log uploaded on Monday, October 14, 2019, 8:38:14 PM
Loaded mods:
Core: (no assemblies)
HugsLib[ov:6.1.3]: 0Harmony(1.2.0.1), HugsLib(av:1.0.0.0,fv:6.1.3)
EdB Prepare Carefully: 0Harmony(1.2.0.1), EdBPrepareCarefully(1.0.13.0)
Cheaper Components: (no assemblies)
Wall Light: $HugsLibChecker(0.5.0.0), WallLight(1.0.0.0)
Tilled Soil: (no assemblies)
Rimsenal - Rimhair: (no assemblies)
Spoons Hair Mod: (no assemblies)
You can’t perform that action at this time.