Skip to content

Instantly share code, notes, and snippets.

View davps's full-sized avatar

David Perez davps

View GitHub Profile
package com.javatutorial;
import java.util.ArrayList;
import java.util.List;
public class ExampleRadixSort {
public static void main(String[] args) {
// TODO Auto-generated method stub
/****************************************************************************
* This demonstrates binary heap operations along with the heapSort.
*
*****************************************************************************/
import java.util.*;
@SuppressWarnings("unchecked")
public class Heap<AnyType extends Comparable<AnyType>>
{
private static final int CAPACITY = 2;
@davps
davps / install-nodejs-on-raspberrypi-armv6.md
Last active September 22, 2024 18:46
Steps to install nodejs on Raspberry Pi B+ (armv6)

Steps to install nodejs v6.2 on Raspberry Pi B+ (armv6)

cd ~
wget http://nodejs.org/dist/v6.2.1/node-v6.2.1-linux-armv6l.tar.gz
tar -xzf node-v6.2.1-linux-armv6l.tar.gz
node-v6.2.1-linux-armv6l/bin/node -v

The last command should print v6.2.1.

Now you can copy it to /usr/local

@davps
davps / raspberry_configuration_steps.md
Last active May 1, 2019 19:54
Steps to configure my raspberry pi with Rapsbian Jessie using silentinstall (headless installation)

Install Raspbian Jessie on Raspberry Pi using silentinstall (headless installation), ready for SSH access

This http://raspberrypi.stackexchange.com/a/19928 is an amazing guide but it is not up to date. So I modified it here to document the steps I followed to install Raspbian Jessie on my Raspberry Pi. You can refer to that guide for more details.

Using only the laptop's screen and keyboard (both before and after installation), install and configuration for headless operation using SSH is possible using NOOBS (they call it "silent install"). It does not require a separate screen or keyboard/mouse. It does require an SD card reader on the laptop (built in or external USB), though.

The only thing required on the Raspberry Pi side is an Ethernet connection (to SSH into it from a host system). Alternatively, using special hardware (USB-to-serial adapter), it possible to use some GPIO pins on the Raspberry Pi.

@davps
davps / image manipulation scripts.md
Last active August 30, 2017 12:38
Imagemagick scripts I frequently use

Installation

brew install imagemagick

brew install ghostscript

brew install ufraw

netpbm dcraw
@davps
davps / Global.sublime-settings
Last active November 15, 2016 21:47 — forked from benatkin/Global.sublime-settings
excluding node_modules from Sublime Text 2 and 3
// Place user-specific overrides in this file, to ensure they're preserved
// when upgrading
{
"folder_exclude_patterns": [".svn", ".git", ".hg", "CVS", "node_modules", "bower_components"]
}
@davps
davps / gist:4bed350c00d262161eb2
Last active November 10, 2015 19:31
Workaround to install Vagrant 1.7.4 on Mac OS X El Capitan

After using the installer vagrant_1.7.4.dmg I got this error when trying to use vagrant from the console on Mac OS X El Capitan:

-bash: vagrant: command not found

So, after reading this bug report hashicorp/vagrant#6034 I created a new bin/ folder in this way:

cd /usr/local
@davps
davps / gist:ebffb93fcfb3e042ea4f
Last active December 21, 2020 05:23
Install Spring STS on Mac OS X

=== Install Spring STS on Mac OS X El Capitan using HomeBrew

First, install homebrew

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Then install cask (https://github.com/caskroom/homebrew-cask)

@davps
davps / gist:40e9143f0c452dfeed0e
Last active August 29, 2015 14:14
Spring STS installation instructions for OSX Yosemite 10.10.2
Disclaimer: I'm a beginner on OSX (at the moment I wrote this, on February 2015).
1- Read the official documentation from here:
http://docs.spring.io/s2-dmserver/2.0.0.RELEASE/getting-started/html/ch02s03.html
Below are the summarized steps based on that documentation.
2- Download Spring STS
3- Open the terminal and navigate to this folder:
/Users/david/Downloads/