Skip to content

Instantly share code, notes, and snippets.

iturki / Configure.markdown
Last active Aug 29, 2015
How to Create a Wireless Hotspot in Windows 7
View Configure.markdown

Step 1: Setting the wireless hotspot info:

Run cmd as Administrator and type the following:

> netsh wlan set hostednetwork mode=allow ssid=HotspotName key=HotspotPass keyUsage=persistent
HotspotName: The Hotspot SSID (Hotspot name)
HotspotPass: The Hotspot Password.
iturki / mohammad-analysis.R
Last active Apr 1, 2016
Analysis of the different ways to write the name Mohammad. More info:
View mohammad-analysis.R
require(wordcloud )
fileName <- "data.txt"
conn <- file(fileName,open="r")
names <-readLines(conn)
List <- c()
for (i in 1:length(names)){
#remove commas from the fullname
phoebebright / index.html
Created Jul 12, 2012
d3 rescale axis example
View index.html
<title>D3 Axis Example</title>
<script src=""></script>
<button id="rescale" onclick="rescale();">Rescale</button>
var width = 700,
thom-nic /
Created May 6, 2011
NumberPicker Preference Dialog for Android!
import android.content.Context;
import android.content.DialogInterface;
import android.content.res.TypedArray;
import android.preference.DialogPreference;
import android.util.AttributeSet;
import android.view.View;
public class NumberPickerPreference extends DialogPreference {
mbmc /
Last active Nov 25, 2019
Delete Parse duplicated Installation object for Android app
// Android app
private void setupParse(Context context) {
Parse.initialize(this, <PARSE_APP_ID>, <PARSE_CLIENT_KEY>);
ParseInstallation.getCurrentInstallation().put("uniqueId", getWifiMacAddress(context));
private String getWifiMacAddress(Context context) {
WifiManager wifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
if (wifiManager != null && wifiManager.getConnectionInfo() != null) {
View viz.js
d3.csv("data/gates_money.csv", function(data) {
$(document).ready(function() {
$('#view_selection a').click(function() {
var view_type = $(this).attr('id');
$('#view_selection a').removeClass('active');
View Twitter User Object MySQL Schema.sql
`twitter_id` int(10) unsigned NOT NULL,
`created_at` timestamp NOT NULL default '0000-00-00 00:00:00',
`name` varchar(80) NOT NULL,
`screen_name` varchar(30) NOT NULL,
`location` varchar(120) default NULL,
`description` varchar(640) default NULL,
`profile_image_url` varchar(400) NOT NULL,
`url` varchar(100) default NULL,
cavedave / WorldHeat.r
Last active May 19, 2020
Heatmap of world Temperature in r package for ggplot2
View WorldHeat.r
#This is inspired by this piral animation of the same dataset
#and this R code to produce the animation
# It also uses elements of this
# and this graphic
alkos333 / gist:1771618
Created Feb 8, 2012
Read URL GET variable
View gist:1771618
// Given a query string "?to=email&why=because&first=John&Last=smith"
// getUrlVar("to") will return "email"
// getUrlVar("last") will return "smith"
// Slightly more concise and improved version based on
function getUrlVar(key){
var result = new RegExp(key + "=([^&]*)", "i").exec(;
return result && unescape(result[1]) || "";
bavington / outside-the-loop.php
Last active Jan 6, 2021
How to access the Loop and display your posts, from outside of Wordpress.
View outside-the-loop.php
require($_SERVER['DOCUMENT_ROOT'] . '/wordpress/wp-load.php');
$args = array(
// 'cat' => 3, // Only source posts from a specific category
'posts_per_page' => 2 // Specify how many posts you'd like to display
$latest_posts = new WP_Query( $args );
if ( $latest_posts->have_posts() ) {
while ( $latest_posts->have_posts() ) {