Skip to content

Instantly share code, notes, and snippets.

G91 ;Relative positioning
G1 E-2 F2700 ;Retract a bit
G1 E-2 Z0.2 F2400 ;Retract and raise Z
G1 X5 Y5 F3000 ;Wipe out
G1 Z10 ;Raise Z more
G90 ;Absolute positionning
G1 X0 Y{machine_depth} ;Present print
;ALTERADO INICIO
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Autop | </title>
<meta name="csrf-param" content="authenticity_token" />
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>Imprimir</title>
</head>
<body>
<?php
if (isset($_POST['cpf']) ):
class Aluno
attr_accessor :matricula, :nome, :notas
def media_do_semestre
6
end
def to_s
"#{matricula} - #{nome}"
end
server {
listen 80;
server_name iphoneria.rubert.com.br;
client_max_body_size 500M;
location / {
root /usr/share/nginx/www/iphoneria;
access_log /var/log/nginx/iphoneria.rubert.com.br.domain_access.log;
$app->post('/estabelecimento/categoria/:id/update', function ( $id ) use ( $app ) {
$params = $app->request->params();
$header = array('Content-Type: multipart/form-data');
$token = key( $_SESSION['current_user'] );
$current_user = json_decode( $_SESSION['current_user'][$token] );
if ( isset( $_FILES ) and isset( $_FILES['imagem'] ) ):
$params['imagem'] = '@'.$_FILES['imagem']['tmp_name'];
endif;
@rafarubert
rafarubert / gist:3431527
Created August 23, 2012 02:30
functions php
<?php
if ( function_exists( 'add_theme_support' ) ) {
add_theme_support( 'post-thumbnails' );
}
function remove_footer_admin () {
echo 'Carnabral 2012.';
}
function change_footer_version() {
def rescue_action_in_public(exception)
if exception
deliverer = self.class.exception_data
data = case deliverer
when nil then {}
when Symbol then send(deliverer)
when Proc then deliverer.call(self)
end
ExceptionNotifier.deliver_exception_notification(exception, self,request, data)
flash[:error] = "Blah";redirect_to '/'
@rafarubert
rafarubert / gist:2557708
Created April 30, 2012 12:08
.osx, peguei de alguém e não acho a referencia
# Disable menu bar transparency
defaults write NSGlobalDomain AppleEnableMenuBarTransparency -bool false
# Show remaining battery time; hide percentage
defaults write com.apple.menuextra.battery ShowPercent -string "NO"
defaults write com.apple.menuextra.battery ShowTime -string "YES"
# Always show scrollbars
defaults write NSGlobalDomain AppleShowScrollBars -string "Always"
class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController
def method_missing(provider)
if !User.omniauth_providers.index(provider).nil?
#omniauth = request.env["omniauth.auth"]
omniauth = env["omniauth.auth"]
if current_user #or User.find_by_email(auth.recursive_find_by_key("email"))
current_user.user_tokens.find_or_create_by_provider_and_uid(omniauth['provider'], omniauth['uid'])
#flash[:notice] = "Authentication successful"
redirect_to edit_user_registration_path