Skip to content

Instantly share code, notes, and snippets.

// Scraping Made Easy with jQuery and SelectorGadget
// (http://blog.dtrejo.com/scraping-made-easy-with-jquery-and-selectorga)
// by David Trejo
//
// Install node.js and npm:
// http://joyeur.com/2010/12/10/installing-node-and-npm/
// Then run
// npm install jsdom jquery http-agent
// node numresults.js
//
@barbietunnie
barbietunnie / css-responsive-images-alt.html
Created May 18, 2011 18:49 — forked from necolas/css-responsive-images.html
Idea for CSS-only responsive images using CSS3 generated content and attr() function. No browser implementation as of May 2011
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS responsive images</title>
<style>
/* Play nice with existing requirements for
Responsive Images polyfill */
@media (min-device-width:600px) {
@barbietunnie
barbietunnie / node-and-npm-in-30-seconds.sh
Created July 1, 2011 02:33 — forked from isaacs/node-and-npm-in-30-seconds.sh
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl http://npmjs.org/install.sh | sh
@barbietunnie
barbietunnie / gist:2163080
Created March 22, 2012 20:11 — forked from luetkemj/wp-query-ref.php
WP: Query $args
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query
* Source: http://core.trac.wordpress.org/browser/tags/3.3.1/wp-includes/query.php
*/
$args = array(
/* The date/time conversion code is going to be moved outside the asynctask later,
* so for convenience we're breaking it out into its own method now.
*/
private String getReadableDateString(long time){
// Because the API returns a unix timestamp (measured in seconds),
// it must be converted to milliseconds in order to be converted to valid date.
Date date = new Date(time * 1000);
SimpleDateFormat format = new SimpleDateFormat("E, MMM d");
return format.format(date).toString();
}
#! /bin/bash
# Batch Convert Script by StevenTrux
# The Purpose of this Script is to batch convert any video file to mp4 or mkv format for chromecast compatibility
# this script only convert necessary tracks if the video is already
# in H.264 format it won't convert it saving your time!
# Put all video files need to be converted in a folder!
# the name of files must not have " " Space!
# Rename the File if contain space
public class CustomRowView extends View {
private CharSequence mText;
private Layout mTextLayout;
private TextPaint mTextPaint;
private Drawable mImageDrawable;
public CustomRowView(Context context) {
this(context, null);
package com.example;
import android.content.Context;
import android.database.Cursor;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.util.SparseIntArray;
import android.view.ViewGroup;
@barbietunnie
barbietunnie / Easing.cs
Last active August 29, 2015 14:12 — forked from Fonserbc/Easing.cs
using UnityEngine;
/*
* Functions taken from Tween.js - Licensed under the MIT license
* at https://github.com/sole/tween.js
*/
public class Easing
{
public static float Linear (float k) {