Skip to content

Instantly share code, notes, and snippets.

View calderonsteven's full-sized avatar

Steven Calderon calderonsteven

View GitHub Profile
@calderonsteven
calderonsteven / deploy-package-aem.bat
Created July 19, 2017 21:02
Deploy and install a aem package via curl
curl -u admin:admin -F file=@target/my-package.zip -F strict=true -F install=true http://localhost:4502/crx/packmgr/service.jsp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#pragma strict
import SimpleJSON;
var currentImageIndex = 0;
var isWaiting = false;
var startRotation;
function Update(){
//startRotation = transform.rotation;
//transform.Rotate(Vector3(0,0,1));
@calderonsteven
calderonsteven / SimpleMoveController.js
Last active August 29, 2015 14:22
Move the controller using CharacterController.move function.
#pragma strict
var walkSpeed = 150;
var rotateSpeed = 100;
var jumpSpeed : float = 8.0;
var gravity : float = 20.0;
private var moveDirection : Vector3 = Vector3.zero;
function Update () {
@calderonsteven
calderonsteven / renamefiles.py
Created March 20, 2015 20:12
rename files in a folder
import os
mypath = 'C:\Users\Edward Calderon\Downloads\RDX exterior 360\RDX exterior 360\SilverMoon\jpg'
baseName = 'Silver_Moon_'
counter = 1
for f in os.listdir(mypath):
newFilename = '{baseName}{counter:04d}.jpg'.format(baseName=baseName, counter=counter)
os.rename(os.join(mypath,f), os.join(mypath, newFilename))
counter += 1
print 'Ok for {0}'.format(newFilename)
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<script>
//Ahorcado
//se ve mas bonito inicializar los arreglos asi.
var palabras = ['Prince' , 'Megaman', 'Sonic', 'MarioKart',
'Frogger', 'PacMan', 'Excitebike',
rm(list=ls())
path_to_dir <- "~/Dropbox/code/rnad-chiboha" # reset this
setwd(path_to_dir)
# libraries
# install this like so:
install.packages('plyr')
install.packages('makeR')
library('plyr')
library('makeR')
@calderonsteven
calderonsteven / NegroRobotGeoMap.html
Last active December 20, 2015 19:49
codigo de ejemplo para incluir el plugin de mapa georeferenciado con un hashtag de instagram
<!DOCTYPE html>
<html>
<head>
<title>NegroRobot Geo Map for instagram</title>
<!--para usar el fancyzoom es necesario usar kquery 1.7.2-->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<!--Es necesario el api de google maps-->
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?sensor=false"></script>
@calderonsteven
calderonsteven / getImage.js
Created July 24, 2013 16:38
get image data from processing sketch
var data = document.getElementById(getProcessingSketchId()).toDataURL();
@calderonsteven
calderonsteven / LineSegment.pde
Created June 18, 2013 16:59
get intersections between lines
// line segment class
class LineSegment {
// storage for begin/end points
PVector begin;
PVector end;
PVector intersection;