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
| // I rewrote this solution in TypeScript for practice. | |
| function minWindow(s: string, t: string): string { | |
| let table: Map<string, number> = new Map() | |
| // Initialize frequency table | |
| for (const char of t) { | |
| const prev = table.get(char) | |
| if (prev) { | |
| table.set(char, prev + 1) |
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
| 210-348-5000 | |
| 210-348-5001 | |
| 210-348-5002 | |
| 210-348-5003 | |
| 210-348-5004 | |
| 210-348-5005 | |
| 210-348-5006 | |
| 210-348-5007 | |
| 210-348-5008 | |
| 210-348-5009 |
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
| 210 - 348 | |
| 212 - 348 | |
| 213 - 348 | |
| 214 - 348 | |
| 215 - 348 | |
| 216 - 348 | |
| 217 - 348 | |
| 218 - 348 | |
| 310 - 348 | |
| 312 - 348 |
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 | |
| # This is what I did, YMMV | |
| # See also: https://github.com/chubin/pyphoon/issues/27 | |
| cd ~ | |
| git clone https://github.com/chubin/pyphoon | |
| cd pyphoon | |
| pip install -r requirements.txt | |
| chmod +x setup.py | |
| ./setup.py develop |
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
| function wrap_html_attr($atts, $content = null){ | |
| /* input e.g. 'value="[some_shortcode]"' */ | |
| return do_shortcode( $content ); | |
| } | |
| add_shortcode( 'wha', 'wrap_html_attr' ); |
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 | |
| /* dev_or_prod_widget by mr.alexweber@gmail.com | |
| ** checks our IP against the DNS record for our hostname | |
| ** if they don't match, this is probably a development server | |
| */ | |
| function dev_or_prod_widget() { | |
| $my_ip = trim( file_get_contents('http://icanhazip.com') ); | |
| $my_domain = $_SERVER['SERVER_NAME']; | |
| $official_ip = gethostbyname($my_domain); |
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 | |
| /* This was used on a marketing quiz based on a formula provided by a marketer. | |
| It was my job to make his rough logic into something that worked! | |
| */ | |
| /* description: | |
| ** pull variables from $_POST: conf, char, aggr, rapp, kiss, date | |
| ** quiz_points = scale(20=0, 100=50)(conf + char + aggr + rapp) | |
| ** | |
| ** kiss_points = kiss * 2.5 (maximum of 25) |
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 | |
| /* This bit is in use on my site still, originally coded in 2012. | |
| You can see an example on this page: http://alexweber.is/nerdy/ | |
| */ | |
| /** custom page+category logic **/ | |
| function list_posts_if_also_category() { | |
| if(is_page() && !is_home() && !is_front_page()){ | |
| $this_post_title = the_title('','',FALSE); |
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
| lame --mp3input -a -b 48 --resample 44.1 infile.mp3 [outfile.mp3] |
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
| delete b | |
| from wp_posts a | |
| left join wp_term_relationships b ON ( a.ID = b.object_id ) | |
| LEFT JOIN wp_term_taxonomy d ON ( d.term_taxonomy_id = b.term_taxonomy_id ) | |
| LEFT JOIN wp_terms e ON ( e.term_id = d.term_id ) | |
| WHERE e.term_id = YOUR_TERM_ID and a.post_author = YOUR_AUTHOR_ID; |
NewerOlder