#Make-A-Twitter-Bot Workshop
Session led by Allison Parrish
##Some of my bots
- Power Vocab Tweet (markov chains)
- Library of Emoji (context-free grammars)
- Egress Methods (CMU pronouncing dictionary)
- Eventually Bot
function get_url($atts) { | |
$pageURL = 'http'; | |
if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";} | |
$pageURL .= "://"; | |
if ($_SERVER["SERVER_PORT"] != "80") { | |
$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"]; | |
} else { | |
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"]; | |
} | |
return $pageURL; |
<% # app/views/layouts/admin.html.erb %> | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Admin Interface</title> | |
<%= csrf_meta_tags %> | |
<% # Optionally use admin-specific assets here instead of the normal application assets %> | |
<%= stylesheet_link_tag 'admin', media: 'all', 'data-turbolinks-track': 'reload' %> |
<div class="comments-block"> | |
<button id="show-comments" onclick="disqus();return false;">Load Comments</button> | |
</div> | |
<div id="disqus_thread"></div> | |
<script> | |
var disqus_loaded = false; | |
var disqus_shortname = 'xxxx'; //Add your shortname here |
#Make-A-Twitter-Bot Workshop
Session led by Allison Parrish
##Some of my bots
<?php | |
/** | |
* Add custom fields to Display Posts Shortcode | |
* @author Bill Erickson | |
* @link http://wordpress.org/extend/plugins/display-posts-shortcode/ | |
* @link http://www.billerickson.net/shortcode-to-display-posts/comment-page-1/#comment-4565 | |
* | |
* @param $output string, the original markup for an individual post | |
* @param $atts array, all the attributes passed to the shortcode | |
* @param $image string, the image part of the output |
/**********************************************/ | |
/* | |
/* | |
/* Crate -- Theme for Chrome DevTools | |
/* Last Update :: September 2013 | |
/* | |
/* based on: | |
/* mnml by Michael P. Pfeiffer | |
/* Based on a Gist by Ben Truyman. Further attr: | |
/* https://gist.github.com/3040634 |
## just some ways to check if a url exists | |
# method 1 - from Simone Carletti | |
require "net/http" | |
url = URI.parse("http://www.google.com/") | |
req = Net::HTTP.new(url.host, url.port) | |
res = req.request_head(url.path) | |
# method 2 - from some kid on the internet | |
require 'open-uri' |
$camphor300:'d09GMgABAAAAAQ5UABIAAAAEn0QAAQ3tAAEZmQAAAAAAAAAAAAAAAAAAAAAAAAAAG4SkahzOKgZgFotgAIosCCIJgnMRCAqLlgCKvTwBNgIkA5lwE4GnDguZdAAEIAW7bwcgDHJb0WS0WUXZkokWaBHx4wKbY7TigANIU/t980QCGzI/IkCsdbqJZwY1ZOgWDngIamw3I43435Dd+zJ1kNmKVp/DvXNAwaNm//////////////////+/NZkMZ5cAl0CpbZ3oiwloFA5GyIWNzOYVLt1bpXPX+pABI2fo5rMZpgVYIzYqgxt92ajECqUKh2G9gaOCVRC23VSRVypHfbvb7wYcwEM25WArF0esm1yKzDixrJRdcBGtcpBZTFbFbIl8LIU4gWOnEdSITqkoGrHWJ8ywn9eVFWWk3lC6m07qp1TXntHaWp6ekYHLrFoyzOXYiQnn2kWX2zqMaFBTca25vHKndPhJV66HRhQzL9lB3OT20KGTXuFHu62wm1qzoV/iTnaiLdc8o/D7B+1O94BrjSE3cia6U1A5XNp0kHmUj8IMBaeiGaiNJV7b1csb0bq8EWYo2h1TuipR+7hmYjxeZsonGLNcmgsKp5EUDCEj9SvRyxX2uMUNfINmfNqglBYNNtjtNmdwWV2ly4uQKheyDyka2RTRoQ3IEfs+0BNcGJ4Z5AnmHNpFbCKW5PsXkAzJ6VVzzVMo0fwIUpQQT67itTNRE946/NxDashl9KuAFUbZ6yW91vObh+WAMZ1mQ1J4wotF6KXHuo65X6wSz406hW/T6XZMf/6W+HGYUxCDfhyjPaoMGcWccmbYM/H35NdHTOd79Jg0ho/BDBvRy2vcg8pHsv07UYiKrDFeqzL0Qk7qCkXLuukl2EKuR3xS6VtsLEaT0BfWoDYoQ1YvEjjT729XNMYoCX3j+2ApedBG/UHLOJ7AAnfPSqdmmePsY+522MpfPaf7kf6fIJMn0/4SE6PmuI3yjyeGjWn+1qj/ukf09DE |
// Weights | |
$hairline-weight: 100; | |
$thin-weight: 200; | |
$light-weight: 300; | |
$normal-weight: 400; | |
$medium-weight: 500; | |
$semibold-weight: 600; | |
$bold-weight: 700; | |
$xbold-weight: 800; | |
$black-weight: 900; |
Install Synthwave ’84/Synthwave + Fluoromachine theme on VS Code (I used the Fluoromachine one)
Install Custom CSS and JS Loader
Command + Shift + P to open command palette > "Preferences: Open settings (JSON)"