☕
- GitHub Staff
- https://abrah.am
- @abraham@indieweb.social
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Place anywhere in the <body> of your page replacing :name with a GitHub username and :repo with a repository name --> | |
<a href='http://github.com/:name' class='github-anywhere github-anywhere-user' data-user=':name'>Follow :name on GitHub</a> | |
<a href='http://github.com/:name/:repo' class='github-anywhere github-anywhere-watch' data-user=':name' data-repo=':repo'>Watch :name/:repo on GitHub</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Requires the TwitterOAuth library. http://github.com/abraham/twitteroauth | |
require_once('twitteroauth/twitteroauth.php'); | |
// ACCESS_TOKEN and ACCESS_SECRET are only needed if you want the request to count against a specific users rate limit. | |
$connection = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET, ACCESS_TOKEN, ACCESS_SECRET); | |
if(!empty($_REQUEST['screen_name']) { | |
// I'm using users/show but you could also use users/profile_image here. | |
$connection->get('users/show', array('screen_name' => $_REQUEST['screen_name'])); | |
if($connection->http_code == 200) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<Response> | |
<Gather action="/process.php" method="GET"> | |
<Say>Please enter your account number, followed by the pound sign</Say> | |
</Gather> | |
<Say>We didn't receive any input. Goodbye!</Say> | |
</Response> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"history": [{ | |
"short_url": "http://goo.gl/Sp8J", | |
"long_url": "http://app.apigee.com/console/apigee-console-snapshots-1285909200000_2ec49d92-fb23-4352-8ff2-3a7124df31dc/rendersnapshotview", | |
"creation_time": "2010-10-10T06:54:16.701+00:00", | |
"details": { | |
"two hours": { | |
"clicks": { | |
"short_url": 0, | |
"chart_url": "http://chart.apis.google.com/chart?cht\u003dlfi\u0026chd\u003ds:AAAAAAAAAAAAAAAAAAAAAAAA\u0026chds\u003d0.0,4.9E-324\u0026chs\u003d50x15\u0026chco\u003d287ff5" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Place share links here --> | |
<div class='post-header'> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Source: http://www.webdesignerwall.com/tutorials/the-simpler-css-grid/ */ | |
.container { | |
width: 978px; | |
margin: 0 auto; | |
} | |
.grid1, .grid2, .grid3, .grid4, .grid5, .grid6, .grid7, .grid8, .grid9, .grid10, .grid11 { | |
float: left; | |
margin-left: 30px; | |
} | |
.grid1 { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Require the TwitterOAuth library. http://github.com/abraham/twitteroauth | |
require_once('twitteroauth/twitteroauth.php'); | |
$connection = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET, ACCESS_TOKEN, ACCESS_SECRET); | |
// Empty array that will be used to store followers. | |
$profiles = array(); | |
// Get the ids of all followers. | |
$ids = $connection->get('followers/ids'); | |
// Chunk the ids in to arrays of 100. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Download the latest version of http://github.com/abraham/twitteroauth/downloads | |
// Move twitteroauth.php and OAuth.php into this directory. | |
// Register an application at http://dev.twitter.com/apps. | |
// Get a user access token as described in http://dev.twitter.com/pages/oauth_single_token. | |
require_once('twitteroauth.php'); | |
$connection = new TwitterOAuth('app consumer key', 'app consumer secret', 'my access token', 'my access token secret'); | |
$connection->format = 'xml'; | |
$status = $connection->post('statuses/update', array('status' => $message)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Download TwitterOAuth from http://github.com/abraham/twitteroauth. | |
require_once('twitteroauth/twitteroauth.php'); | |
// Get consumer keys from http://dev.twitter.com/apps. | |
$consumer_key = ''; | |
$consumer_secret = ''; | |
$oauth_bridge_code = ''; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e -x | |
export DEBIAN_FRONTEND=noninteractive | |
apt-get update && apt-get upgrade -y | |
tasksel install lamp-server | |
apt-get install git-core | |
echo "Please remember to set the MySQL root password!" |