Skip to content

Instantly share code, notes, and snippets.

@gaecom
gaecom / README.md
Created October 14, 2013 06:52 — forked from nikcub/README.md
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
<input type="file" id="files" name="files[]" multiple />
<output id="list"></output>
#byte_content {
margin: 5px 0;
max-height: 100px;
overflow-y: auto;
overflow-x: hidden;
}
#byte_range { margin-top: 5px; }
#progress_bar {
margin: 10px 0;
var timeOutObj;
$(function(){
$(".card-btn").popover({
trigger: "manual",
html : true,
placement: function(tip, element) {
var $element, above, actualHeight, actualWidth, below, boundBottom, boundLeft, boundRight, boundTop, elementAbove, elementBelow, elementLeft, elementRight, isWithinBounds, left, pos, right;
isWithinBounds = function(elementPosition) {
return boundTop < elementPosition.top && boundLeft < elementPosition.left && boundRight > (elementPosition.left + actualWidth) && boundBottom > (elementPosition.top + actualHeight);
};
<div id="iPhoneBro" class="iPhone gen">
<div class="title">
<input type="submit" class="back button" value="Messages">
<span class="contact_name button">(614) MEME-BRO</span>
<input type="submit" class="edit button" value="Edit">
</div>
<div id="conversation" class="conversation ">
<div class="time"><div class="time"><p>Aug 9, 2012 3:43 AM</p></div></div><div class="text sent" id="query"><div class="reflect"></div><p>Check Out <a href-"http://www.memebro.com/?r=codepen">memebro.com</a></p></div>
<div class="text receive"><div class="reflect"></div><p>Try "+popular", "+trending", or "+new" for meme lists</p></div>
<div class="text sent" id="query"><div class="reflect"></div><p>+popular</p></div>

Muoversi da jQuery a javascript

Usare Javascript invece che jQuery nei tuoi progetti può essere una mossa molto intelligente, non solo imparerai più a fondo le dinamiche del linguaggio e diventarai naturalmente più esperto, ma incrementerai notevolmente le performance del tuo sito.

Se lavori in grossi progetti e applicazioni che richiedono tante linee di codice lavorare in puro Javascript è un po frustrante, in questo caso un mix di JQuery e Javascript è necessario.

  1. [Eventi] (#eventi)
  2. [Selettori] (#selettori)
  3. [Modifica Attributi] (#modifica)
#!/bin/bash
echo -e "\nbenchmark.sh -n<number of requests> -c<number of concurrency> <URL1> <URL2> ..."
echo -e "\nEx: benchmark.sh -n100 -c10 http://www.google.com/ http://www.bing.com/ \n"
## Gnuplot settings
echo "set terminal png
set output 'benchmark_${1}_${2}.png'
set title 'Benchmark: ${1} ${2}'
@gaecom
gaecom / designer.html
Created July 31, 2014 07:44
designer
<link rel="import" href="../components/polymer/polymer.html">
<polymer-element name="my-element">
<template>
<style>
#ace_element {
width: 400px;
height: 300px;
left: 140px;
@gaecom
gaecom / build.sh
Last active August 29, 2015 14:06 — forked from jonah-williams/build.sh
#!/bin/bash
# https://gist.github.com/949831
# http://blog.carbonfive.com/2011/05/04/automated-ad-hoc-builds-using-xcode-4/
# command line OTA distribution references and examples
# http://nachbaur.com/blog/how-to-automate-your-iphone-app-builds-with-hudson
# http://nachbaur.com/blog/building-ios-apps-for-over-the-air-adhoc-distribution
# http://blog.octo.com/en/automating-over-the-air-deployment-for-iphone/
# http://www.neat.io/posts/2010/10/27/automated-ota-ios-app-distribution.html

Why?

When working on a remote machine, or a machine that doesn't have a GUI plist editor on it, the command line may be your only or best option.

There are two options present on OS X to help you.

default

Using the default command on OS X can help you get around.