Skip to content

Instantly share code, notes, and snippets.

@levinotik
levinotik / AndroidConversions.scala
Created May 16, 2012 17:57 — forked from pfn/AndroidConversions.scala
AndroidConversions.scala
package com.hanhuy.android.irc
import android.app.Activity
import android.app.ActionBar
import android.content.Intent
import android.content.Context
import android.content.BroadcastReceiver
import android.content.res.Configuration
import android.os.AsyncTask
import android.os.Build
/*
* twitter-entities.js
* This function converts a tweet with "entity" metadata
* from plain text to linkified HTML.
*
* See the documentation here: http://dev.twitter.com/pages/tweet_entities
* Basically, add ?include_entities=true to your timeline call
*
* Copyright 2010, Wade Simmons
* Licensed under the MIT license
@levinotik
levinotik / playground.rs
Created April 10, 2016 21:05 — forked from anonymous/playground.rs
Shared via Rust Playground
fn main() {
// No good because we move v to v2
// which creates a copy of the pointer
// which means we have two pointers
// to the content of the vector on the heap
// this violates safety guarantees
// by introducing a data race
// therefore Rust forbids using v after the move