Skip to content

Instantly share code, notes, and snippets.

View maltzsama's full-sized avatar
💭
Göteborgs

maltzsama

💭
Göteborgs
View GitHub Profile
new_user_session GET /users/sign_in(.:format) devise/sessions#new
user_session POST /users/sign_in(.:format) devise/sessions#create
destroy_user_session DELETE /users/sign_out(.:format) devise/sessions#destroy
user_password POST /users/password(.:format) devise/passwords#create
new_user_password GET /users/password/new(.:format) devise/passwords#new
edit_user_password GET /users/password/edit(.:format) devise/passwords#edit
PATCH /users/password(.:format) devise/passwords#update
PUT /users/password(.:format) devise/passwords#update
cancel_user_registration GET /users/cancel(.:format) devise/registrations#cancel
user_registration POST /users(.:format) devise/registrations#create
@maltzsama
maltzsama / CompositURL.m
Last active August 29, 2015 13:57
class method
#import "CompositURL.h"
#import "Defines.h"
@implementation CompositURL
//Composit URL Programation
+ (NSURL *) compositWithStr:(NSString *)strUrl{
NSString *strUrl = @"host";
strUrl = [strUrl stringByAppendingFormat:@"%@.json",strUrl];
NSURL *url = [[NSURL alloc]initWithString:strUrl];
@maltzsama
maltzsama / validation.html
Last active August 29, 2015 13:57
Validação usando angulares
<div class="large-12 columns">
<label>Username</label>
<input type="text"
placeholder="Desired username"
name="username" <!-- sá porra aqui tem que tá no teu controller como $scope.username -->
ng-model="signup.username"
ng-minlength=3
ng-maxlength=20
ensure-unique="username" required />
<div class="error-container" ng-show="signup_form.username.$dirty && signup_form.username.$invalid">
@maltzsama
maltzsama / signupController.js
Created March 26, 2014 18:24
Validação para coisas.
app.controller('signupController', ['$scope', function($scope) {
$scope.submitted = false;
$scope.signupForm = function() {
if ($scope.signup_form.$valid) {
// Submit as normal
} else {
$scope.signup_form.submitted = true;
}
}
}]);
@maltzsama
maltzsama / person.clj
Created March 27, 2014 16:40
Person Class
(defstruct person :first-name :last-name)
@maltzsama
maltzsama / Portifolio.md
Last active February 16, 2018 03:26
Aplicativos desenvolvidos

Aplicações desenvolvidas

Aplicativo com intuito de coletar dados a respeito de visitas técnicas de inspeção de segurança no trabalho.

Empresa desenvolvedora - Galileo Stdio

API desenvolvida em Rails para integração do web-client e aplicação mobile

Empresa desenvolvedora - Galileo Stdio

@maltzsama
maltzsama / config.sh
Created February 2, 2015 15:26
Initial configuration of OS X to develop for iOS
#!/bin/sh
#title :config.sh
#description :This script will proced the initial setup of a developer machine
#author :Demetrius Albuquerque
#date :20150202
#version :0.1
#usage : ./config.sh
#notes :chmod +x to run the script
ALL=$1
//
//  LoginViewController.swift
//  ITSoftin
//
//  Created by demetrius albuquerque on 08/12/14.
//  Copyright (c) 2014 Snowman Labs. All rights reserved.
//
import UIKit
import Foundation
@maltzsama
maltzsama / rustconfig.sh
Created August 3, 2015 16:43
rust config sh
echo "-------------------------------"
echo "setup linux env"
echo "-------------------------------"
sudo apt-get update
sudo apt-get -y install apt-utils git gcc g++ perl python2.7 curl make unzip nano
echo "-------------------------------"
echo "download rpi toolchain"
echo "-------------------------------"
wget https://github.com/raspberrypi/tools/archive/master.zip
@maltzsama
maltzsama / getImage.py
Created August 3, 2015 19:46
Get image from webcam
import pygame
from pygame import camera
pygame.init()
pygame.camera.init()
camList = pygame.camera.list_cameras()
if camList:
#for camComponent in camList:
cam = pygame.camera.Camera(camList[0], (1280, 720))
cam.start()