// Custom Admin styles + JS
add_action('admin_enqueue_scripts', function($hook){
wp_enqueue_style('fb_wp_admin_css', Assets\asset_path('styles/admin.css'));
wp_enqueue_script('fb_wp_admin_js', Assets\asset_path('scripts/admin.js'), ['jquery'], null, true);
}, 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
#!/usr/bin/ruby | |
require 'CSV' | |
output = '' | |
# get areas | |
areas = {} | |
CSV.foreach("community-areas.csv", headers:true) do |row| | |
areas[row['shapeid']] = row['community'] | |
end |
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
#!/usr/bin/ruby | |
require 'json' | |
output = '' | |
file = File.read('niagarazips.json') | |
city = 'NiagaraFalls' | |
# file = File.read('nczips.json') | |
# city = 'NashEdgecombe' | |
# file = File.read('nyzips.json') | |
# city = 'NewYork' |
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 | |
// Pull all files in a directory into an array | |
$comic_dir = $_GET['comic']; // something like '001' | |
$files_in_dir = dirList("/archive/$comic_dir/",'\d+\.\w{3}'); // assumes files are named 5.jpg, can adjust regex if you have other files in dir you don't want to output (like a cover image) | |
function pageJumpLinks($num_pages) { | |
$output = ''; | |
for ($i=0; $i < $num_pages; $i++) { | |
$output .= '<a href="#' . $i . '">' . $i . '</a> | '; | |
} |
NewerOlder