Skip to content

Instantly share code, notes, and snippets.

var XML2jsobj = function(){
var negate
, isNodeOfType
, isElement
, isTextNode
, hasOneChild
, and
, adder
, addAttribute
, addTextNode
@safareli
safareli / gicrostaticAI.md
Last active August 29, 2015 14:10
გიკროსტატიკური ხელოვნური ინტელექტი

ამ ბოლო დროს მეგობრებს ღამეები აღარ გვძინავს და ვმუშაობდით ხელოვნური ინტელექტის ერთ გიკროსტიკურტ პროეტზე რომლის ფარგლებშიც შევქმენით ეს bookmarklet * ის დაგეხმარებათ ნებისმიერ კითხვაზე იპოვოთ პასუხი :3

javascript:var _a = document.location.href = "https://www.google.ge/#q="+encodeURIComponent(prompt("what you want?"))

ps. თუ არ იცით რაარის bookmarklet და გაინტერესებთ დააწექით F12 შემდეგ გადადით კონსოლში და ჩაწერეთ ეს :

document.location.href = "https://www.google.ge/#q="+encodeURIComponent(prompt("what you want?"))
@safareli
safareli / Drupal Web Services
Last active August 29, 2015 14:06
სასარგებლო ლინკები RESTfull ვებ სერვისებზე Drupal-ის ჭრილში
Drupal Web Services
@staltz
staltz / introrx.md
Last active April 24, 2025 06:10
The introduction to Reactive Programming you've been missing
@wadewegner
wadewegner / upload_rest.py
Last active August 9, 2024 16:01
Upload attachment to Salesforce using Python
import requests
import base64
import json
from simple_salesforce import Salesforce
userName = ''
password = ''
securityToken = ''
instance = ''
@nickloewen
nickloewen / bret_victor-reading_list.md
Last active April 3, 2025 00:26
Bret Victor’s Reading List

This is a plain-text version of Bret Victor’s reading list. It was requested by hf on Hacker News.


Highly recommended things!

This is my five-star list. These are my favorite things in all the world.

A few of these works have had an extraordinary effect on my life or way of thinking. They get a sixth star. ★

@gtke
gtke / Lucene
Last active June 1, 2017 13:30
Parse XML + Index + Search
import org.apache.commons.digester3.*;
import org.apache.lucene.analysis.standard.StandardAnalyzer;
import org.apache.lucene.document.Document;
import org.apache.lucene.document.Field;
import org.apache.lucene.document.Field.Index;
import org.apache.lucene.document.FieldType;
import org.apache.lucene.index.DirectoryReader;
import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.IndexWriter;
import org.apache.lucene.index.IndexWriterConfig;
@desandro
desandro / require-js-discussion.md
Created January 31, 2013 20:26
Can you help me understand the benefit of require.js?

I'm having trouble understanding the benefit of require.js. Can you help me out? I imagine other developers have a similar interest.

From Require.js - Why AMD:

The AMD format comes from wanting a module format that was better than today's "write a bunch of script tags with implicit dependencies that you have to manually order"

I don't quite understand why this methodology is so bad. The difficult part is that you have to manually order dependencies. But the benefit is that you don't have an additional layer of abstraction.


@gtke
gtke / bst
Created January 28, 2013 16:14
Binary Search Tree - JAVA implementation
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
/**
* BST
* @author gtkesh
*/
public class BST<T extends Comparable<T>> {