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 | |
| $url = '/url?q=http://kalmar.nordicclub.se/&sa=U&ei=BhuIT-GeMsa4hAe3vpjBCQ&ved=0CBQQFjAA&usg=AFQjCNEiItwYT11xyZOityGMH5Q5noBsZw'; | |
| $real_url = substr($url, strpos($url, '/url?q=') + strlen('/url?q='), strpos($url, '&sa=') - strlen('/url?q=')); | |
| var_dump($real_url); |
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
| /* | |
| * HtmlAgilityPack | |
| */ | |
| using System; | |
| using System.Net; | |
| using HtmlAgilityPack; | |
| public class Program { | |
| public static void Main(string[] args) { |
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 get_header(); ?> | |
| <?php if(is_front_page()): ?> | |
| <div id="text" style="width: 600px;"> | |
| <?php else: ?> | |
| <div id="text"> | |
| <?php endif; ?> | |
| <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> | |
| <?php if(!is_front_page()): ?> |
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 | |
| class FuturePostsWidget extends WP_Widget { | |
| function __construct() { | |
| } | |
| function widget($args, $instance) { | |
| $query = new WP_Query('post_status=future&order=DESC&showposts=10'); | |
| printf("%d future posts", count($query)); |
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
| #!/usr/bin/python | |
| # -*- coding: utf-8 -*- | |
| import re | |
| score_table = [ | |
| ('fitta', -300), | |
| ('kuk', -300), | |
| ("jävla", -20), | |
| ("helvete", -70), | |
| ("skit", -40), |
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 | |
| class Smash { | |
| /** | |
| * Combine all files with a certain extension in a directory into a single file | |
| */ | |
| public function smash_directory($directory, $extension, $output) { | |
| $files = glob($directory . '*.' . $extension); | |
| $smashed = ''; | |
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
| class Program { | |
| private delegate void BottlesDelegate(int input); | |
| static void Main(string[] args) { | |
| IL(); | |
| Console.WriteLine("Done"); | |
| Console.ReadLine(); | |
| } |
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
| using System; | |
| using System.Diagnostics; | |
| using System.Linq; | |
| using System.Reflection; | |
| using System.Reflection.Emit; | |
| namespace ilab { | |
| class Program { | |
| private delegate string StringManipulator(string input); | |
| static void Main(string[] args) { |
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 | |
| $html = '<html> | |
| <head> | |
| </head> | |
| <body> | |
| <img src="foo.jpg" title="heheh" alt="" /> | |
| <img src="foo.jpg" title="heheh" /> | |
| <img src="foo.jpg" title="heheh" alt="blaha" /> | |
| </body> |
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
| public partial class SiteMaster : System.Web.UI.MasterPage { | |
| protected void Page_Load(object sender, EventArgs e) { | |
| AssignContentLanguage(); | |
| } | |
| protected void AssignContentLanguage() { | |
| var currentPath = Request.Url.Query; | |
| var contentLanguage = "sv"; | |
| if (currentPath.StartsWith("?no/")) contentLanguage = "no"; |