Skip to content

Instantly share code, notes, and snippets.

View vjandrea's full-sized avatar

Andrea Bergamasco vjandrea

View GitHub Profile
@landonf
landonf / 0_completion_post.txt
Last active August 29, 2015 14:07
Data posted to Apple by Spotlight (Bulky JSON payloads have been reformatted for readability). Note the X-Apple-UserGuid -- this appears to remain constant across all requests.
POST /fb?key=andromeda HTTP/1.1
Host: api.smoot.apple.com
Content-Type: application/json
Accept-Charset: utf-8
Connection: keep-alive
X-Apple-ActionSignature: ArFF0Bupz4+n05DZ/5MjOYH6XbRrC98eRfE+8OzUT0wKAAABwAMAAAABAAABAO7FAuqnAwyvZFj4n1tcSQxl42hKlg/915t5zBgrff9a2axEBZXtPF2Tg0rdJIEJJ/r4sMinOShzj3lvY9LmX1ZS76JmJNM0WZLzpat3WBzTmsgwyWUGSwO1ZUCURtaYyd5GryXCOfKyC0EIy8g3ppLlRdg4NOfIH043t/x7dzXjSJnuFZxgjkNtXJjlZtpyhU/1aozZABRHLK6nnPu33ek59bQMDwtQGyPC/3+DBJeujZcVuZI6of22HaV2oVFLz3zXEfEAcfeL5WPLWinnmLN+RZIrONwRmy/64kYbrkDO3P00R96wW6LJBYe63d6vWCrXlWTQeL7DDtwaR29Q0lYAAAAQ7fKDT5fxlqnZiMWRl6sNlQAAAJ8BZJzusSpopU9YFrn8J9VG1D/Ve1QAAACGBQJ/jp+/zKfOoBgaJGgjxWW8VEHM8hOyIUG96CcnUgA2Aqfvvv9nzKjAU05WWJSzGq4jMw5xzBsDlj9oSpM9/8PEHAlDKz2v7hNR3TLlAkH/2GMJgF7ly7dnqPPG4fjEvoT7Pz/bEepVSsboPqm8ztaSvCYoC3xBbXEPPO5AjiH4jeDbKLI=
Accept: application/json
X-Apple-UserGuid: 267af341-df6c-4eed-5e78-a2b8a49a1d1f
User-Agent: (OS X 14A389) Spotlight/916
Content-Length: 5991
@GuyMograbi
GuyMograbi / smart-table.html
Created June 8, 2013 20:47
The complete code for my AngularJS post serie on my blog at blog.mograbi.info. Coming soon..
<html ng-app="myApp">
<head>
<style>
body {background-color:#cecece; margin:0; padding:0; font-family:Arial; }
body>div:first-child {width:50%; margin:auto; margin-top:40px;}
table {border:none; border-collapse:collapse; width:100%;}
table tr { border:none;}
table tr td { border:none; font-size:37px; font-weight:bolder;}
table tr:first-child{background-color:#00ff00;}
table tr:nth-child(2n){ background-color:blue;}
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>Downcast Podcasts</title>
</head>
<body>
<outline text="Tribal Pulse Podcast" type="rss" title="Tribal Pulse Podcast" xmlUrl="http://tribalpulse.podomatic.com/rss2.xml" htmlUrl="http://tribalpulse.podomatic.com" />
<outline text="Weird Shift Radio" type="rss" title="Weird Shift Radio" xmlUrl="http://www.weirdshift.com/weirdshiftradio.rss" htmlUrl="http://www.weirdshift.com/weirdshiftradio.html" />
<outline text="w-h-y ? podcast - www.w-h-y.org" type="rss" title="w-h-y ? podcast - www.w-h-y.org" xmlUrl="http://feeds.feedburner.com/w-h-y-podcast" htmlUrl="http://selectedmodernmusic.blogspot.com/" />
<outline text="Uncensored History of the Blues" type="rss" title="Uncensored History of the Blues" xmlUrl="http://feeds.feedburner.com/UncensoredHistoryOfTheBlues" htmlUrl="http://uncensoredhistoryoftheblues.purplebeech.com/" />
@2m
2m / gist:7a5443cee96541a98870
Created September 15, 2014 15:45
podcasts
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.1">
<head>
<title>BeyondPod Feeds</title>
<dateCreated>Sun, 24 Aug 2014 12:39:43 GMT+03:00</dateCreated>
<dateModified>Sun, 24 Aug 2014 12:39:43 GMT+03:00</dateModified>
</head>
<body>
<outline text="Security">
<outline text="Security Now (MP3)" xmlUrl="http://leoville.tv/podcasts/sn.xml" type="rss" />
@sirleech
sirleech / gist:5047400
Created February 27, 2013 11:56
Jquery AJAX call to JSON rest service, with spinner animation during load
<html>
<head>
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<style>
body {font-size: 200%;}
.hidden {display:none;}
</style>
</head>
<body>
Random: <div id="randomNumber">RAND</div>
#custom-templates .empty-message {
padding: 5px 10px;
text-align: center;
}
jQuery(document).ready(function() {
jQuery("#the-empty-div").click(function(){
jQuery.ajax({
type: 'POST',
url: my_ajax_data.ajax_url,
data: {
action: 'my_ajax_action_callback',
security: my_ajax_data.security_nonce,
first_name: 'John', // Get this however
last_name: 'Smith', // Get this however
@thanashyam
thanashyam / jquery.md5.js
Created April 5, 2012 10:00
Jquery MD5 - downloaded from: http://plugins.jquery.com/project/md5 (which is no longer available)
/**
* jQuery MD5 hash algorithm function
*
* <code>
* Calculate the md5 hash of a String
* String $.md5 ( String str )
* </code>
*
* Calculates the MD5 hash of str using the » RSA Data Security, Inc. MD5 Message-Digest Algorithm, and returns that hash.
* MD5 (Message-Digest algorithm 5) is a widely-used cryptographic hash function with a 128-bit hash value. MD5 has been employed in a wide variety of security applications, and is also commonly used to check the integrity of data. The generated hash is also non-reversable. Data cannot be retrieved from the message digest, the digest uniquely identifies the data.
@marick
marick / about_those_lava_lamps.md
Last active June 22, 2022 21:08
About Those Lava Lamps

Around 2006-2007, it was a bit of a fashion to hook lava lamps up to the build server. Normally, the green lava lamp would be on, but if the build failed, it would turn off and the red lava lamp would turn on.

By coincidence, I've actually met, about that time, (probably) the first person to hook up a lava lamp to a build server. It was Alberto Savoia, who'd founded a testing tools company (that did some very interesting things around generative testing that have basically never been noticed). Alberto had noticed that people did not react with any urgency when the build broke. They'd check in broken code and go off to something else, only reacting to the breakage they'd caused when some other programmer pulled the change and had problems.

@duncansmart
duncansmart / gist:3982912
Created October 30, 2012 20:45
Guid compression
static string compressGuid(Guid guid)
{
// "MspzuC2oLkKjoUEgZrbJFg=="
return Convert.ToBase64String(guid.ToByteArray())
.Substring(0, 22)
.Replace('+', '-')
.Replace('/', '_');
}