Skip to content

Instantly share code, notes, and snippets.

View orenmizr's full-sized avatar
🎯
Focusing

Oren Mizrahi orenmizr

🎯
Focusing
View GitHub Profile
$( "#create-user" )
.button()
.click(function() {
$( "#dialog-form" ).dialog( "open" );
});
@orenmizr
orenmizr / new_gist_file
Created August 8, 2013 14:23
Java: Simple Thread Example
package com.crunchify;
public class CrunchifyThread {
/**
* @author Crunchify.com
*/
public static void main(String args[]) {
new ThreadTest("eBay").start();
<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
<%@page import="DBcontroll.*,java.util.*,model.*,servlets.*,services.*"%>
<%@include file="config.jsp" %>
<%
Object userName = session.getAttribute( "userName" );
Object userId = session.getAttribute( "userId" );
Object msg = session.getAttribute( "messageToUser");
session.setAttribute( "messageToUser", null );
/* FACE LIFE */
.navbar {
opacity: 1;
}
.navbar-inner {
background: #3498DB !important;
}
@orenmizr
orenmizr / .jshintrc
Created September 23, 2013 00:04 — forked from haschek/.jshintrc
{
// --------------------------------------------------------------------
// JSHint Configuration, Strict Edition
// --------------------------------------------------------------------
//
// This is a options template for [JSHint][1], using [JSHint example][2]
// and [Ory Band's example][3] as basis and setting config values to
// be most strict:
//
// * set all enforcing options to true
// use this to avoid redirects when a user clicks "back" in their browser
window.location.replace('http://somewhereelse.com');
// use this to redirect, a back button call will trigger the redirection again
window.location.href = "http://somewhereelse.com";
// given for completeness, essentially an alias to window.location.href
window.location = "http://somewhereelse.com";
python -m http.server
@orenmizr
orenmizr / regex.js
Created April 16, 2014 10:08
regex rules
ruleRegex = /^(.+?)\[(.+)\]$/,
numericRegex = /^[0-9]+$/,
integerRegex = /^\-?[0-9]+$/,
decimalRegex = /^\-?[0-9]*\.?[0-9]+$/,
emailRegex = /^[a-zA-Z0-9.!#$%&amp;'*+\-\/=?\^_`{|}~\-]+@[a-zA-Z0-9\-]+(?:\.[a-zA-Z0-9\-]+)*$/,
alphaRegex = /^[a-z]+$/i,
alphaNumericRegex = /^[a-z0-9]+$/i,
alphaDashRegex = /^[a-z0-9_\-]+$/i,
naturalRegex = /^[0-9]+$/i,
naturalNoZeroRegex = /^[1-9][0-9]*$/i,
# setup vagrant
gem install vagrant
vagrant box add lucid32 http://files.vagrantup.com/lucid32.box
mkdir my_vagrant_test
cd my_vagrant_test
vagrant init lucid32
vim Vagrantfile
vagrant up
vagrant ssh