Skip to content

Instantly share code, notes, and snippets.

View simonewebdesign's full-sized avatar
🇺🇦
💙 💛

Simone Vittori simonewebdesign

🇺🇦
💙 💛
View GitHub Profile
@simonewebdesign
simonewebdesign / helloworld.rb
Created October 17, 2012 11:32
Say "Hello, World!" in Ruby
puts "Hello, World!"
@simonewebdesign
simonewebdesign / helloworld.java
Created October 17, 2012 11:35
Say "Hello, World!" in Java
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, World!");
}
}
@simonewebdesign
simonewebdesign / helloworld.js
Created October 17, 2012 11:39
Say "Hello, World!" in JavaScript
alert("Hello, World!");
@simonewebdesign
simonewebdesign / helloworld.coffee
Created October 17, 2012 11:40
Say "Hello, World!" in CoffeeScript
alert "Hello, World!"
@simonewebdesign
simonewebdesign / helloworld.php
Created October 17, 2012 11:43
Say "Hello, World!" in PHP
<?php echo "Hello, World!";
<button id="btn">Click me!</button>
<script>
var btn = document.getElementById('btn');
btn.onclick = function() {
// will be overwritten!
console.log('[onclick] foo');
}
@simonewebdesign
simonewebdesign / index.haml
Created November 22, 2012 12:02
A CodePen by simonewebdesign. CSS 3D Transform - 3D Rotation with perspective
!!!
%html
%head
%title CSS 3D Transform
%body
#wrapper
#test
#test2
#test3
#light
@simonewebdesign
simonewebdesign / helloworld.c
Created December 30, 2012 12:07
Say "Hello, World!" in C
#include <stdio.h>
main()
{
printf("Hello, World!\n");
}
@simonewebdesign
simonewebdesign / chmod_dir.sh
Created January 29, 2013 11:51
Chmod all files to 664 and folders to 775 of a given directory. First argument is the directory.
# for files
find $1 -type f -print0 | xargs -0 chmod -v 664
# for folders
find $1 -type d -print0 | xargs -0 chmod -v 775
@simonewebdesign
simonewebdesign / confirmDelete.js
Last active December 12, 2015 04:28
Display a confirm box when the user clicks on the delete link (event delegation).
/* Display a confirm box when the user
* clicks on the delete link.
*/
function confirmDeleteHandler(e) {
e = e || window.event;
var target;
target = e.target || e.srcElement;
if ( target.className.match(/\bconfirmDelete\b/) ) {
if (!confirm('Are you sure?')) {
e.preventDefault();