Skip to content

Instantly share code, notes, and snippets.

@nevosegal
nevosegal / HTML
Created June 11, 2013 14:47
Simple google maps implementation including a search field Just add API key and Default address.
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div class="textBox">
<input type="text" id="address" value="">
<input type="button" value="Search" onClick="codeAddress()"></div>
@nevosegal
nevosegal / tools.json
Created August 20, 2015 16:39
list of tools for journalist toolbox testing
[{
"name": "R",
"developer": "R Core Team",
"description": "R is a free software environment for statistical computing and graphics. It compiles and runs on a wide variety of UNIX platformss, Windows and MacOS.",
"version": "3.2.1",
"price": 0,
"free" : true,
"upvotes": [],
"downvotes": [],
"home_url": "http://www.r-project.org/",
var bufferSize = 4096;
var whiteNoise = ac.createScriptProcessor(bufferSize, 1, 1);
var m = ac.createScriptProcessor(bufferSize,1,1);
whiteNoise.onaudioprocess = function(e) {
var output = e.outputBuffer.getChannelData(0);
for (var i = 0; i < bufferSize; i++) {
output[i] = Math.random() * 2 - 1;
}
}
@nevosegal
nevosegal / levenshteinDistance.cpp
Last active June 18, 2018 10:01
Levenshtein distance
#include <iostream>
using namespace std;
int getMinValueInArray(int *inputArray, int arrayLength) {
int minIndex = 0;
for(int i = 1; i < arrayLength; i++) {
if (inputArray[i] < inputArray[minIndex]) {
minIndex = i;
}
@nevosegal
nevosegal / AppDelegate.swift
Created October 8, 2019 14:06
Simple way to reproduce iOS bug - connecting Bluetooth Headphones while app is backgrounded.
//
// AppDelegate.swift
// ios-bluetooth-bug
//
// Created by Nevo Segal on 08/10/2019.
//
import UIKit
import AVFoundation