This file contains hidden or 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
#import "My_Objective_C_Project-Swift.h" | |
@implementation MyObjectiveCClass | |
+ (void)doSomething { | |
[MySwiftClass doSomething]; | |
} | |
@end |
This file contains hidden or 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
import Foundation | |
@objc class MySwiftClass : NSObject { | |
@objc public class func doSomething() { | |
NSLog("Here I am!"); | |
} | |
} |
This file contains hidden or 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/sh | |
if [ $# -eq 0 ]; then | |
echo "Usage: sh spectrify.sh | |
<Table to export in format: schemaname.tableName> | |
<Should create schema: true/false> | |
<Should create table: true/false> | |
<Should truncate Redshift table: true/false>" | |
fi |
This file contains hidden or 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
select * from mv_events_count; |
This file contains hidden or 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
REFRESH MATERIALIZED VIEW mv_events_count; |
This file contains hidden or 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
CREATE MATERIALIZED VIEW mv_events_count AS | |
SELECT * FROM dblink('rds_redshift', $REDSHIFT$ | |
SELECT count(*) | |
FROM events; | |
$REDSHIFT$) AS t1 (c int); |
This file contains hidden or 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
SELECT * FROM dblink('rds_redshift', $REDSHIFT$ | |
SELECT count(*) | |
FROM events; | |
$REDSHIFT$) AS t1 (c int); |
This file contains hidden or 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
CREATE SERVER rds_redshift FOREIGN DATA WRAPPER postgres_fdw | |
OPTIONS (host '<redshift_ip_address>', port '5439', dbname '<redshift_db_dname>', sslmode 'require'); | |
CREATE USER MAPPING FOR <rds_user_name> SERVER rds_redshift | |
OPTIONS (user '<redshift_user_name>', password '<redshift_user_password>'); |
This file contains hidden or 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
CREATE EXTENSION postgres_fdw; | |
CREATE EXTENSION dblink; |
This file contains hidden or 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 | |
/** | |
* Scrape the number of podcast reviews from iTunes for all country specific storefronts. | |
* | |
* @author Sean Murphy <sean@iamseanmurphy.com> | |
*/ | |
$podcast_id = '366931951'; // Startups For the Rest of Us | |
//$podcast_id = '318567721'; // techzing |
NewerOlder