Skip to content

Instantly share code, notes, and snippets.

View cbjuan's full-sized avatar

Juan Cruz-Benito cbjuan

View GitHub Profile
@cjus
cjus / jsonval.sh
Created June 26, 2011 17:42
Extract a JSON value from a BASH script
#!/bin/bash
function jsonval {
temp=`echo $json | sed 's/\\\\\//\//g' | sed 's/[{}]//g' | awk -v k="text" '{n=split($0,a,","); for (i=1; i<=n; i++) print a[i]}' | sed 's/\"\:\"/\|/g' | sed 's/[\,]/ /g' | sed 's/\"//g' | grep -w $prop`
echo ${temp##*|}
}
json=`curl -s -X GET http://twitter.com/users/show/$1.json`
prop='profile_image_url'
picurl=`jsonval`
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active May 17, 2024 02:53
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@kirantemojo
kirantemojo / index.html
Created October 7, 2013 17:59
D3 JS Simple Horizontal Bar chart
<!DOCTYPE html>
<html>
<head>
<title>Dsnap - Charts</title>
<style>
#xaxis .domain {
fill:none;
stroke:#000;
}
#xaxis text, #yaxis text {
@rxaviers
rxaviers / gist:7360908
Last active May 23, 2024 07:41
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@mbostock
mbostock / .block
Last active March 19, 2024 07:45
Wrapping Long Labels
license: gpl-3.0
@bsweger
bsweger / useful_pandas_snippets.md
Last active April 19, 2024 18:04
Useful Pandas Snippets

Useful Pandas Snippets

A personal diary of DataFrame munging over the years.

Data Types and Conversion

Convert Series datatype to numeric (will error if column has non-numeric values)
(h/t @makmanalp)

@dtchepak
dtchepak / README.md
Created August 31, 2014 06:53
D3 newbie updates a bar chart
@ihuston
ihuston / Flask on CF.md
Last active February 11, 2023 19:16
Simple Flask application for Cloud Foundry

Simple Python Flask app on Cloud Foundry

This is a (very) simple Flask application that shows how the built-in Python buildpack detection on Cloud Foundry works.

To push to Cloud Foundry, log in and then use

$ cf push myapp-name

Python on Cloud Foundry

@nbremer
nbremer / .block
Last active November 8, 2021 14:22
Stretched Chord Diagram - From educations to occupations
height: 780
license: bsd-2-clause
@nbremer
nbremer / .block
Last active May 23, 2024 09:34
Radar Chart Redesign
height: 600
license: mit
acknowledgement: Please add "Nadieh Bremer | Visual Cinnamon" to your credit when re-using this code, thank you!