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
G21 ; Set metric values | |
G90 ; Set absolute positioning | |
M82 ; Set extruder to absolute mode | |
G28 X0 Y0 ; Move X/Y to min endstops | |
G28 Z0 ; Move Z to min endstops | |
G1 Z20 ; Raise Z to 20mm | |
M190 S{material_bed_temperature_layer_0} ; Wait for bed temperature to reach target | |
M109 S{material_print_temperature_layer_0} T0 ; Set extruder temperature and wait | |
G29 ; Auto-leveling | |
G1 X0 Y0 F3000 ; Go to home (without homing: it would disable compensation) |
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
<style> | |
div#hello-jz > h3 { | |
border: 5px solid red; | |
} | |
</style> | |
<div id="hello-jz"> | |
<h3>Hello, JZ</h3> | |
<div> |
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
$(document).ready(function(){ | |
if ($.browser.msie && parseInt($.browser.version) >= 10) { | |
$("body").on("mousedown", ".photo_uploader input[type='file']", function(){ | |
$(this).click(); | |
}); | |
} | |
}); |
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
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCiP5RhaE57ph0HGzakk5bqpZ2T/KORQZmm8VsZC+117iEL4yzmUmG1QWDoZ/fgBI7Fq0N9B9OjVoC1IOEzTRBZspeFOYIRQa3FhbvVTHsgNALp+ES3Sw4JOuWJljB88RhHCpCdFAII7dM8nQLyTYceLsMfHu6lmym2G+2DMeh3WL76kPcZuZDz2MS9PCNgyRGr4eER7m4H8tjCnI9tVrvKPpaqNHTH4eRLHYY6DO8QOsOrPcfeuGVCQW5xI8xIZzPqc/KxlXcRwg0qqO/o80nNPa8aygw0vrucLMOi3IRTqV8pwrkh+HyNDkijLknPnhOvNNr+GoVtjgYvzqwJ87qL [email protected] |
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
if(@app.is_site_cat_enabled?) | |
raw %Q{ | |
CO.Events.trigger('navigate_screen', $.extend(#{opts}, { | |
screen_permanent_id: '#{navigation_target.permanent_id}', | |
source_component_id: '#{source_component.id}' | |
})); | |
} + sc_trigger | |
else | |
raw %Q{ | |
CO.Events.trigger('navigate_screen', $.extend(#{opts}, { |
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
# | |
# Copyright (c) 2012 Jonathan Lancar | |
# Licensed under the MIT license. | |
# | |
module JLancar | |
BSTNode = Struct.new(:value, :left_node, :right_node) | |
class BinaryTree | |
attr_accessor :root_node |
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
### Jonathan Lancar - https://github.com/jonaphin ### | |
######################### | |
#### Class#to_proc #### | |
######################### | |
class Class | |
# Initialize multiple objects at once | |
def to_proc | |
proc{ |*args| self.new *args } | |
end |
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
### Jonathan Lancar - https://github.com/jonaphin ### | |
################################### | |
## String#to_proc Implementation ## | |
################################### | |
class String | |
# Evaluates a string as ruby code | |
def to_proc | |
proc { |arg| eval "#{arg}#{self}" } | |
end |
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
### Jonathan Lancar - https://github.com/jonaphin ### | |
## Match Regular Expression to one or multiple strings | |
class Regexp | |
def to_proc | |
proc { |arg| arg.to_s[self] } | |
end | |
end | |
## USE CASE ## |
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
### Jonathan Lancar - https://github.com/jonaphin ### | |
######################### | |
## Simple Hash Example ## | |
######################### | |
class Hash | |
# if argument passed to the hash is a key of it, | |
# call the hash's value (at key) as a method that acts on said key | |
def to_proc | |
proc { |arg| self.has_key?(arg) ? self[arg].to_proc.call(arg) : arg } |