Skip to content

Instantly share code, notes, and snippets.

View NickCarneiro's full-sized avatar
🔨
Building

Nick Carneiro NickCarneiro

🔨
Building
View GitHub Profile
@NickCarneiro
NickCarneiro / recruitfb.js
Created August 14, 2014 22:00
Snippet for finding devs on Facebook
// 1) install jquery injector https://chrome.google.com/webstore/detail/jquery-injector/indebdooekgjhkncmgbkeopjebofdoid
// 2) using graph search, do something like "My friends of friends who live in San Francisco, California and studied Computer Science"
// 3) Run this in the chrome console
// 4) Paste the pipe-delimited output into a file
$('._1zf').each(function() {
var name = $(this).find('a').first().text().trim();
var employmentContainer = $(this).find('._pac');
var links = $(employmentContainer).find('a');
if (links.length === 1) {
### Keybase proof
I hereby claim:
* I am nickcarneiro on github.
* I am nickcarneiro (https://keybase.io/nickcarneiro) on keybase.
* I have a public key whose fingerprint is 7CA2 F1AE 21A6 7957 A63A 35E9 3192 F2DE 2F55 8B19
To claim this, I am signing this object:
Range("B4").Select
Do While (IsEmpty(ActiveCell) = False Or IsEmpty(ActiveCell.Offset(1, 0)) = False)
If ActiveCell.Value = ActiveCell.Offset(0, 1) Or ActiveCell.Offset(1, 0).Value = ActiveCell.Offset(1, 1) Then
ActiveCell.Offset(1, 0).Select
If ActiveCell.Offset(1, 0).Value = ActiveCell.Offset(0, 1) Then
ActiveCell.Range("B1:C1").Select
Selection.Insert Shift:=xlDown
Else
ActiveCell.Range("B1:C1").Select
Selection.Delete Shift:=xlUp
//convert web to mobile
int web_width = 1279;
int web_height = 1795;
int x_mid = web_width / 2;
int y_mid = web_height / 2;
Integer x_in = X_INPUT_FROM_ROHAN;
Integer y_in = Y_INPUT_FROM_ROHAN;
float minDot = Float.MAX_VALUE;
//apply logic from above else loop here also
for (PointWithRSSI p : compare) {
float currDot = 0;
Set<String> c = p.getAccessPoints().keySet();
for (String s: keys) {
if (c.contains(s)) {
currDot += p.getAccessPoints().get(s)*p.getAccessPoints().get(s) ;
currDot -= (Math.abs(temp.getCurrentPoint().getWeightedaccessPoints().get(s).getRssi()) * Math.abs(p.getAccessPoints().get(s))); //add to the dot product
}
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>Devcomm Extraction Automation</display-name>
<context-param>
<description>
The location where state information is saved.
Valid values are 'server' (typically saved in HttpSession) and 'client' (typically
saved as a hidden field in the form.
Default is server.</description>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
#include <stdio.h>
int main(){
/*Declare Variables*/
float yrly_income, mthly_exp, savings, percent_savings, vacation, tracker;
FILE *vacationptr;
/*Create and verify output file*/
public class Main {
/**
* @param args
*
*/
public static void main(String[] args) {
// prints "hello world"
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Temperature{
public static void main(String[] args){
//the data that will be entered by the user
String farenheit1;
@NickCarneiro
NickCarneiro / gist:1831120
Created February 14, 2012 22:35
Demonstration of ArrayList
import java.io.*;
import java.util.ArrayList;
public class ArrayListDemo {
//program for storing an arbitrary number of strings in a list and then printing them out.
public static void main(String[] args){
ArrayList<String> list = new ArrayList<String>();