# articles

url: https://physiqonomics.com/sitting/
title: Sitting Probably Isn't Killing You | Physiqonomics
content:
<div id="readability-page-1" class="page"><article id="post-9074" role="article">

	<header>
		
					<p>
				By Aadam				| Last Updated: June 22nd, 2020			</p>
			</header>

	<section>
		
<p>The internet is reaming with claims that sitting is killing you. But how much truth is there to this claim? Turns out not much. </p>





<p>Every now and then as I’m scrolling through the interwebz I’ll see an article that reads: “BAD NEWS: SITTING IS KILLING YOU!” Or my personal favourite, “SITTING IS THE NEW SMOKING!” </p>



<p>And then everyone freaks the fuck out and decides that going forward WE SHALL SIT NO MORE—STANDING IS OUR LIFE NOW. </p>



<p>But before you forego sitting and drop some serious cash on a shiny new standing desk–you probably want to read this. And by probably, I mean definitely. </p>



<h2>Let’s get this out of the way first: standing doesn’t burn that many more calories than sitting</h2>



<p>In one study, 74 healthy subjects were fitted with masks that measured oxygen consumption, allowing the researchers to calculate how many calories they burned. </p>



<div><figure><img src="https://physiqonomics.com/wp-content/uploads/2019/12/oxygen-mask-01-796x1024.png" alt="Oxygen-Mask-Sitting-Standing-Energy-Expenditure" width="383" height="493"></figure></div>



<p>They then engaged in a number of activities lasting 15 minutes each:</p>



<ul><li>Sitting using a laptop</li><li>Sitting watching TV</li><li>Standing watching TV</li><li>Walking at a self-selected pace (&lt;3 mph)</li></ul>



<div><figure><img src="https://physiqonomics.com/wp-content/uploads/2019/12/energy-expenditure-sitting-standing-01-472x1024.png" alt="" width="389" height="844"></figure></div>



<p>A recent meta-analysis looked at 46 studies with 1184 participants and found the mean difference in energy expenditure between sitting and standing was 0.15kcal/min.  Researchers commenting, ‘By substituting sitting with standing for 6 hours/day, a 65 kg person will expend an additional 54 kcal/day.’</p>



<p>And Beers et al. investigated the energy expenditure between sitting on a therapy ball, sitting in a chair, or standing while typing and found the exercise ball and standing conditions only burned 4.1kcal more than the sitting condition.  </p>



<div><figure><img src="https://physiqonomics.com/wp-content/uploads/2019/12/beers-energy-expenditure-graph-01-1024x915.png" alt="beers-energy-expenditure-graph" width="462" height="413"><figcaption>Adapted from Beers et al., 2008</figcaption></figure></div>



<p>As you can see, the difference in calories expended between sitting and standing isn’t as substantial as some claim. </p>



<p>Further, just <a rel="noreferrer noopener" aria-label="like NEAT, (opens in a new tab)" href="https://physiqonomics.com/slow-metabolism/" target="_blank">like NEAT,</a> there are individual differences in how many calories one burns when standing. Some people don’t really increase their energy expenditure despite standing, while others can see a significant increase. </p>



<h3>Standing isn’t entirely innocuous either</h3>



<p>Going from sitting all day to standing all day can present its own set of problems like swelling in the lower limbs and leg, foot, and back pain. </p>



<p><strong>And despite the numerous ‘sitting is killing you’ claims, it’s not sitting that’s the problem but a lack of movement </strong><em><strong>overall</strong></em>.</p>



<p><a rel="noreferrer noopener" aria-label="Pulsford et al., (2015) (opens in a new tab)" href="https://academic.oup.com/ije/article/44/6/1909/2572591" target="_blank">Pulsford et al., (2015)</a> tracked the health of 5,132 people over 16 years…</p>



<div><figure><img src="https://physiqonomics.com/wp-content/uploads/2019/12/over-sixteen-years-01-2-904x1024.png" alt=""></figure></div>



<p>And found sitting was only associated with mortality risk in those who reported zero minutes of weekly walking or moderate-to-vigorous physical activity.</p>



<p>A 2016 study analysed data from more than 1 million people and found that 60 to 75 minutes of moderately intense physical activity per day countered the effects of too much sitting. </p>



<div><p><strong>A note on epidemiological studies </strong></p><p>All the studies on this type of topic (i.e., ‘sitting is killing you’) are epidemiological. These studies can’t prove causation–so, in this case, the studies can’t prove that sitting is actually killing you or leading to poor health–they can only show a correlation and other factors can be involved. </p><p>For example, all the studies (if not the majority) showing increased sitting time is associated with increased all-cause mortality have been based on TV viewing time. The problem with using TV viewing time is there could be other factors involved. </p><p>One of these factors is calorie intake. </p><p>What do people generally do while watching TV? They eat snacks. And if people are sedentary and eating more calories than they require, this can lead to fat gain which can result in poor health outcomes. But if the researchers don’t factor in these other variables, you’re left with some clickbait Buzzfeed article like ‘SITTING IS BASICALLY SMOKING AND YOU’RE GONNA DIE, FUCKFACE!’</p><p>So it’s not sitting in and of itself that’s the problem, though that can be one factor, but a combination of sitting (sedentary lifestyle) <em>and</em> chronic overeating.  </p><p>This is why when physical activity is factored in, the mortality risk decreases. We know physical activity has a number of health benefits, and people who are physically active also tend to have healthier habits overall. And it’s the combination of several factors that can either increase or decrease mortality risk. </p></div>



<h3>With all of that said, you probably should avoid sitting on your ass all day</h3>



<p>Breaking up sitting time with bouts of activity has a number of health benefits. </p>



<figure><img src="https://physiqonomics.com/wp-content/uploads/2019/12/reduced-insulin-sensitivity-sitting-01-1024x936.png" alt=""></figure>



<p>Even when calorie intake was reduced to match energy expenditure, there was still an 18% reduction in insulin sensitivity. </p>



<p>Conversely, breaking up sitting time with movement–even for short periods of time–has shown to improve the body’s ability to handle insulin.</p>



<figure><a href="https://www.ncbi.nlm.nih.gov/pubmed/22374636" target="_blank" rel="noreferrer noopener"><img src="https://physiqonomics.com/wp-content/uploads/2019/12/dunstant-et-al-2012-sitting-01-1024x604.png" alt="dunstant-et-al-2012-sitting"></a></figure>



<p>In another study, office workers who used a sit-stand station after eating a lunch buffet saw a 43% lower blood glucose response compared to workers who remained seated. </p>



<figure><a href="https://www.ncbi.nlm.nih.gov/pubmed/24297826" target="_blank" rel="noreferrer noopener"><img src="https://physiqonomics.com/wp-content/uploads/2019/12/sitting-standing-glucose-response-01-1024x663.png" alt="sitting-standing-glucose-response-01"></a></figure>



<p>Furthermore, when sedentary office workers replaced sitting with sitting and standing they reported an increased sense of well-being, energy, decreased fatigue, reduced appetite and food intake.  </p>



<p>Taking all of this together, if you have a job that requires you to sit for long periods of time–IT’S TOTALLY FINE. You’ll be ok. Your heart will not randomly implode because you were sitting down. </p>



<p>Just ensure you’re getting up every 30-40 mins to move, walk, stretch, etc. Alongside this, partake in regular physical activity 3-4x per week (like strength training) and you’ll be ok. </p>



<p>Remember that ‘poor health’ (or mortality risk) doesn’t happen in a vacuum. Nail the big rocks like regular exercise, good nutrition, daily activity and don’t stress about the little things. </p>
	</section>

</article></div>


url: https://www.webtoons.com/en/comedy/love-advice/list?title_no=1498&webtoon-platform-redirect=true
title: Love Advice from the Great Duke of Hell
byline: Shen
content:
<div id="readability-page-1" class="page"><div id="_asideDetail">
						<ul>
							<li>
								<span>subscribe</span>
								<em>1M</em>
								<span></span>
							</li>
							<li>
								<span>grade</span>
								<em id="_starScoreAverage">9.80</em>
								<a href="#" id="_rateButton" onclick="return false;">RATE</a>
								
								<div>

									<p><strong>10<span>point</span></strong>
									
									<span>
										<a href="#" title="0">Selected points</a>
										<a href="#" title="1" onclick="return false;">1 points</a>
										<a href="#" title="2" onclick="return false;">2 points</a>
										<a href="#" title="3" onclick="return false;">3 points</a>
										<a href="#" title="4" onclick="return false;">4 points</a>
										<a href="#" title="5" onclick="return false;">5 points</a>
										<a href="#" title="6" onclick="return false;">6 points</a>
										<a href="#" title="7" onclick="return false;">7 points</a>
										<a href="#" title="8" onclick="return false;">8 points</a>
										<a href="#" title="9" onclick="return false;">Select 9 points</a>
										<a href="#" title="10" onclick="return false;">10 point</a>
										
									</span></p><p>[Rate] Click to rate this</p>
									<div>
										<p><a href="#" title="Cancel" onclick="return false;">Cancel</a>								
										<a href="#" title="Send" onclick="return false;">Send</a>
									</p></div>
								</div>
								
								<div>
	                                <p>You've already rated this.<br>Would you like to rate it again?</p>
	                                <div>
	                                    <p><a href="#" title="No">No</a>
	                                    <a href="#" title="Yes">Yes</a>
	                                </p></div>
	                            </div>
							</li>
						</ul>
					
					
					
						<p><span>UP</span>EVERY FRIDAY</p>
					
					
						<p>The girl of your dreams barely knows you exist. Your friends can’t help. Your family is clueless. So where do you turn for love advice? Who can provide you with that essential assistance for the lovelorn?  If you’re average everyday teenager Paul, you summon a powerful demon from deep in the recesses of Hell and frankly, hope for the best.  </p>
						<div>
							<p>
						
							<a href="https://www.webtoons.com/en/comedy/love-advice/episode-1/viewer?title_no=1498&amp;episode_no=1" id="_btnEpisode">First episode<span></span></a>
						</p></div>
					</div></div>


url: https://twitter.com/Fallinginill/status/1198922400017965056
content:
<div id="readability-page-1" class="page"><div id="ScriptLoadFailure"><form action="" method="GET"><p><span dir="auto">Something went wrong, but don’t fret — let’s give it another shot.</span><br></p></form></div></div>


url: https://stackoverflow.com/questions/9626535/get-protocol-host-name-from-url
title: Get protocol + host name from URL
content:
<div id="readability-page-1" class="page"><div id="mainbar" role="main" aria-label="question and answers">

                





                <div id="answers">

                    


                                          
<div id="answer-9626596" data-answerid="9626596" itemprop="acceptedAnswer" itemscope="" itemtype="http://schema.org/Answer">
    <div>
        

        

<div>
    
    <div itemprop="text">
<p>You should be able to do it with <code>urlparse</code> (docs: <a href="https://docs.python.org/2/library/urlparse.html" rel="noreferrer">python2</a>, <a href="https://docs.python.org/3/library/urllib.parse.html" rel="noreferrer">python3</a>):</p>

<pre><code>from urllib.parse import urlparse
# from urlparse import urlparse  # Python 2
parsed_uri = urlparse('http://stackoverflow.com/questions/1234567/blah-blah-blah-blah' )
result = '{uri.scheme}://{uri.netloc}/'.format(uri=parsed_uri)
print(result)

# gives
'http://stackoverflow.com/'
</code></pre>
    </div>
    <div>
        <div>
            
            <div>
<div>
    
    <div>
        <a href="/users/674039/wim"><p><img src="https://i.stack.imgur.com/leoFi.gif?s=32&amp;g=1" alt="" width="32" height="32"></p></a>
    </div>
    <div>
        <p><a href="/users/674039/wim">wim</a></p><p><span title="reputation score 245,057" dir="ltr">245k</span><span title="73 gold badges" aria-hidden="true"><span></span><span>73</span></span><span>73 gold badges</span><span title="443 silver badges" aria-hidden="true"><span></span><span>443</span></span><span>443 silver badges</span><span title="587 bronze badges" aria-hidden="true"><span></span><span>587</span></span><span>587 bronze badges</span>
        </p>
    </div>
</div>            </div>


            <div>
                <div>
    <p>
        answered <span title="2012-03-08 23:17:43Z">Mar 8 '12 at 23:17</span>
    </p>
    <div>
        <a href="/users/680238/kgr"><p><img src="https://www.gravatar.com/avatar/1da1f048eda0ec9789e215ac838cbbfb?s=32&amp;d=identicon&amp;r=PG" alt="" width="32" height="32"></p></a>
    </div>
    <div itemprop="author" itemscope="" itemtype="http://schema.org/Person">
        <p><a href="/users/680238/kgr">kgr</a><span itemprop="name">kgr</span></p><p><span title="reputation score " dir="ltr">8,794</span><span title="2 gold badges" aria-hidden="true"><span></span><span>2</span></span><span>2 gold badges</span><span title="34 silver badges" aria-hidden="true"><span></span><span>34</span></span><span>34 silver badges</span><span title="42 bronze badges" aria-hidden="true"><span></span><span>42</span></span><span>42 bronze badges</span>
        </p>
    </div>
</div>

            </div>
        </div>
    </div>
    
</div>




                
    </div>
</div>


                                          
<div id="answer-9627628" data-answerid="9627628" itemprop="suggestedAnswer" itemscope="" itemtype="http://schema.org/Answer">
    <div>
        

        

<div>
    
    <div itemprop="text">
<p><a href="https://github.com/john-kurkowski/tldextract" rel="noreferrer">https://github.com/john-kurkowski/tldextract</a></p>

<p>This is a more verbose version of urlparse.  It detects domains and subdomains for you.</p>

<p>From their documentation:</p>

<pre><code>&gt;&gt;&gt; import tldextract
&gt;&gt;&gt; tldextract.extract('http://forums.news.cnn.com/')
ExtractResult(subdomain='forums.news', domain='cnn', suffix='com')
&gt;&gt;&gt; tldextract.extract('http://forums.bbc.co.uk/') # United Kingdom
ExtractResult(subdomain='forums', domain='bbc', suffix='co.uk')
&gt;&gt;&gt; tldextract.extract('http://www.worldbank.org.kg/') # Kyrgyzstan
ExtractResult(subdomain='www', domain='worldbank', suffix='org.kg')
</code></pre>

<p><code>ExtractResult</code> is a namedtuple, so it's simple to access the parts you want.</p>

<pre><code>&gt;&gt;&gt; ext = tldextract.extract('http://forums.bbc.co.uk')
&gt;&gt;&gt; ext.domain
'bbc'
&gt;&gt;&gt; '.'.join(ext[:2]) # rejoin subdomain and domain
'forums.bbc'
</code></pre>
    </div>
    <div>
        <div>
            
            


            <div>
                <div>
    <p>
        answered <span title="2012-03-09 01:16:50Z">Mar 9 '12 at 1:16</span>
    </p>
    <div>
        <a href="/users/594589/dm03514"><p><img src="https://www.gravatar.com/avatar/0f9d5953607841d6a50b843a1107e51e?s=32&amp;d=identicon&amp;r=PG" alt="" width="32" height="32"></p></a>
    </div>
    <div itemprop="author" itemscope="" itemtype="http://schema.org/Person">
        <p><a href="/users/594589/dm03514">dm03514</a><span itemprop="name">dm03514</span></p><p><span title="reputation score 48,735" dir="ltr">48.7k</span><span title="16 gold badges" aria-hidden="true"><span></span><span>16</span></span><span>16 gold badges</span><span title="91 silver badges" aria-hidden="true"><span></span><span>91</span></span><span>91 silver badges</span><span title="126 bronze badges" aria-hidden="true"><span></span><span>126</span></span><span>126 bronze badges</span>
        </p>
    </div>
</div>

            </div>
        </div>
    </div>
    
</div>




                
    </div>
</div>

                                          
<div id="answer-20728813" data-answerid="20728813" itemprop="suggestedAnswer" itemscope="" itemtype="http://schema.org/Answer">
    <div>
        

        

<div>
    
    <div itemprop="text">
<h3>Python3 using <a href="http://docs.python.org/3/library/urllib.parse#urllib.parse.urlsplit">urlsplit</a>:</h3>

<pre><code>from urllib.parse import urlsplit
url = "http://stackoverflow.com/questions/9626535/get-domain-name-from-url"
base_url = "{0.scheme}://{0.netloc}/".format(urlsplit(url))
print(base_url)
# http://stackoverflow.com/
</code></pre>
    </div>
    <div>
        <div>
            


            <div>
                <div>
    <p>
        answered <span title="2013-12-22 11:20:29Z">Dec 22 '13 at 11:20</span>
    </p>
    <div>
        <a href="/users/1637277/marc-sj"><p><img src="https://www.gravatar.com/avatar/bb8b90387354cba48f2f3ca5dbdb5135?s=32&amp;d=identicon&amp;r=PG" alt="" width="32" height="32"></p></a>
    </div>
    <div itemprop="author" itemscope="" itemtype="http://schema.org/Person">
        <p><a href="/users/1637277/marc-sj">Marc SJ</a><span itemprop="name">Marc SJ</span></p><p><span title="reputation score " dir="ltr">671</span><span title="7 silver badges" aria-hidden="true"><span></span><span>7</span></span><span>7 silver badges</span><span title="12 bronze badges" aria-hidden="true"><span></span><span>12</span></span><span>12 bronze badges</span>
        </p>
    </div>
</div>

            </div>
        </div>
    </div>
    
</div>




                
    </div>
</div>


                                          
<div id="answer-32214840" data-answerid="32214840" itemprop="suggestedAnswer" itemscope="" itemtype="http://schema.org/Answer">
    <div>
        

        

<div>
    
    <div itemprop="text">
<pre><code>&gt;&gt;&gt; import urlparse
&gt;&gt;&gt; url = 'http://stackoverflow.com/questions/1234567/blah-blah-blah-blah'
&gt;&gt;&gt; urlparse.urljoin(url, '/')
'http://stackoverflow.com/'
</code></pre>
    </div>
    <div>
        <div>
            


            <div>
                <div>
    <p>
        answered <span title="2015-08-25 22:02:51Z">Aug 25 '15 at 22:02</span>
    </p>
    <div>
        <a href="/users/1316604/png"><p><img src="https://www.gravatar.com/avatar/c521ac445f31035df183da945f9216ec?s=32&amp;d=identicon&amp;r=PG" alt="" width="32" height="32"></p></a>
    </div>
    <div itemprop="author" itemscope="" itemtype="http://schema.org/Person">
        <p><a href="/users/1316604/png">png</a><span itemprop="name">png</span></p><p><span title="reputation score " dir="ltr">4,194</span><span title="2 gold badges" aria-hidden="true"><span></span><span>2</span></span><span>2 gold badges</span><span title="19 silver badges" aria-hidden="true"><span></span><span>19</span></span><span>19 silver badges</span><span title="15 bronze badges" aria-hidden="true"><span></span><span>15</span></span><span>15 bronze badges</span>
        </p>
    </div>
</div>

            </div>
        </div>
    </div>
    
</div>




                
    </div>
</div>

                                          
<div id="answer-36609868" data-answerid="36609868" itemprop="suggestedAnswer" itemscope="" itemtype="http://schema.org/Answer">
    <div>
        

        

<div>
    
    <div itemprop="text">
<p>Pure string operations :):</p>

<pre><code>&gt;&gt;&gt; url = "http://stackoverflow.com/questions/9626535/get-domain-name-from-url"
&gt;&gt;&gt; url.split("//")[-1].split("/")[0].split('?')[0]
'stackoverflow.com'
&gt;&gt;&gt; url = "stackoverflow.com/questions/9626535/get-domain-name-from-url"
&gt;&gt;&gt; url.split("//")[-1].split("/")[0].split('?')[0]
'stackoverflow.com'
&gt;&gt;&gt; url = "http://foo.bar?haha/whatever"
&gt;&gt;&gt; url.split("//")[-1].split("/")[0].split('?')[0]
'foo.bar'
</code></pre>

<p>That's all, folks.</p>
    </div>
    <div>
        <div>
            
            


            <div>
                <div>
    <p>
        answered <span title="2016-04-13 21:26:56Z">Apr 13 '16 at 21:26</span>
    </p>
    <div>
        <a href="/users/5649639/sebma"><p><img src="https://www.gravatar.com/avatar/d62527cc72c1a877a15b7bfc27d79a50?s=32&amp;d=identicon&amp;r=PG&amp;f=1" alt="" width="32" height="32"></p></a>
    </div>
    <div itemprop="author" itemscope="" itemtype="http://schema.org/Person">
        <p><a href="/users/5649639/sebma">SebMa</a><span itemprop="name">SebMa</span></p><p><span title="reputation score " dir="ltr">1,823</span><span title="11 silver badges" aria-hidden="true"><span></span><span>11</span></span><span>11 silver badges</span><span title="21 bronze badges" aria-hidden="true"><span></span><span>21</span></span><span>21 bronze badges</span>
        </p>
    </div>
</div>

            </div>
        </div>
    </div>
    
</div>




                
    </div>
</div>

                                          
<div id="answer-50214801" data-answerid="50214801" itemprop="suggestedAnswer" itemscope="" itemtype="http://schema.org/Answer">
    <div>
        

        

<div>
    
    <div itemprop="text">
<p>if you think your url is valid then this will work all the time</p>

<pre><code>domain = "http://google.com".split("://")[1].split("/")[0] 
</code></pre>
    </div>
    <div>
        <div>
            
            <div>
<div>
    
    <div>
        <a href="/users/797495/pedro-lobito"><p><img src="https://i.stack.imgur.com/BKD7l.jpg?s=32&amp;g=1" alt="" width="32" height="32"></p></a>
    </div>
    <div>
        <p><a href="/users/797495/pedro-lobito">Pedro Lobito</a></p><p><span title="reputation score 69,230" dir="ltr">69.2k</span><span title="22 gold badges" aria-hidden="true"><span></span><span>22</span></span><span>22 gold badges</span><span title="189 silver badges" aria-hidden="true"><span></span><span>189</span></span><span>189 silver badges</span><span title="209 bronze badges" aria-hidden="true"><span></span><span>209</span></span><span>209 bronze badges</span>
        </p>
    </div>
</div>            </div>


            <div>
                <div>
    <p>
        answered <span title="2018-05-07 12:57:33Z">May 7 '18 at 12:57</span>
    </p>
    <div>
        <a href="/users/9470099/zeroerr0r"><p><img src="https://graph.facebook.com/1794157777557736/picture?type=large" alt="" width="32" height="32"></p></a>
    </div>
    <div itemprop="author" itemscope="" itemtype="http://schema.org/Person">
        <p><a href="/users/9470099/zeroerr0r">ZeroErr0r</a><span itemprop="name">ZeroErr0r</span></p><p><span title="reputation score " dir="ltr">844</span><span title="9 silver badges" aria-hidden="true"><span></span><span>9</span></span><span>9 silver badges</span><span title="16 bronze badges" aria-hidden="true"><span></span><span>16</span></span><span>16 bronze badges</span>
        </p>
    </div>
</div>

            </div>
        </div>
    </div>
    
</div>




                
    </div>
</div>

                                          
<div id="answer-47453951" data-answerid="47453951" itemprop="suggestedAnswer" itemscope="" itemtype="http://schema.org/Answer">
    <div>
        

        

<div>
    
    <div itemprop="text">
<p>Here is a slightly improved version:</p>

<pre><code>urls = [
    "http://stackoverflow.com:8080/some/folder?test=/questions/9626535/get-domain-name-from-url",
    "Stackoverflow.com:8080/some/folder?test=/questions/9626535/get-domain-name-from-url",
    "http://stackoverflow.com/some/folder?test=/questions/9626535/get-domain-name-from-url",
    "https://StackOverflow.com:8080?test=/questions/9626535/get-domain-name-from-url",
    "stackoverflow.com?test=questions&amp;v=get-domain-name-from-url"]
for url in urls:
    spltAr = url.split("://");
    i = (0,1)[len(spltAr)&gt;1];
    dm = spltAr[i].split("?")[0].split('/')[0].split(':')[0].lower();
    print dm
</code></pre>

<p>Output</p>

<pre><code>stackoverflow.com
stackoverflow.com
stackoverflow.com
stackoverflow.com
stackoverflow.com
</code></pre>

<p>Fiddle: <a href="https://pyfiddle.io/fiddle/23e4976e-88d2-4757-993e-532aa41b7bf0/?i=true" rel="noreferrer">https://pyfiddle.io/fiddle/23e4976e-88d2-4757-993e-532aa41b7bf0/?i=true</a></p>
    </div>
    <div>
        <div>
            
            


            <div>
                <div>
    <p>
        answered <span title="2017-11-23 11:02:25Z">Nov 23 '17 at 11:02</span>
    </p>
    <div>
        <a href="/users/82961/faiz"><p><img src="https://www.gravatar.com/avatar/c8f335b3921cc7f540f72fa21fc9168d?s=32&amp;d=identicon&amp;r=PG" alt="" width="32" height="32"></p></a>
    </div>
    <div itemprop="author" itemscope="" itemtype="http://schema.org/Person">
        <p><a href="/users/82961/faiz">Faiz</a><span itemprop="name">Faiz</span></p><p><span title="reputation score " dir="ltr">4,875</span><span title="8 gold badges" aria-hidden="true"><span></span><span>8</span></span><span>8 gold badges</span><span title="40 silver badges" aria-hidden="true"><span></span><span>40</span></span><span>40 silver badges</span><span title="54 bronze badges" aria-hidden="true"><span></span><span>54</span></span><span>54 bronze badges</span>
        </p>
    </div>
</div>

            </div>
        </div>
    </div>
    
</div>




                
    </div>
</div>

                                          
<div id="answer-16993673" data-answerid="16993673" itemprop="suggestedAnswer" itemscope="" itemtype="http://schema.org/Answer">
    <div>
        

        

<div>
    
    <div itemprop="text">
<p>Is there anything wrong with pure string operations:</p>

<pre><code>url = 'http://stackoverflow.com/questions/9626535/get-domain-name-from-url'
parts = url.split('//', 1)
print parts[0]+'//'+parts[1].split('/', 1)[0]
&gt;&gt;&gt; http://stackoverflow.com
</code></pre>

<p>If you prefer having a trailing slash appended, extend this script a bit like so:</p>

<pre><code>parts = url.split('//', 1)
base = parts[0]+'//'+parts[1].split('/', 1)[0]
print base + (len(url) &gt; len(base) and url[len(base)]=='/'and'/' or '')
</code></pre>

<p>That can probably be optimized a bit ...</p>
    </div>
    <div>
        <div>
            


            <div>
                <div>
    <p>
        answered <span title="2013-06-07 22:06:56Z">Jun 7 '13 at 22:06</span>
    </p>
    <div>
        <a href="/users/996638/simon-steinberger"><p><img src="https://i.stack.imgur.com/AfEcR.jpg?s=32&amp;g=1" alt="" width="32" height="32"></p></a>
    </div>
    <div itemprop="author" itemscope="" itemtype="http://schema.org/Person">
        <p><a href="/users/996638/simon-steinberger">Simon Steinberger</a><span itemprop="name">Simon Steinberger</span></p><p><span title="reputation score " dir="ltr">5,674</span><span title="3 gold badges" aria-hidden="true"><span></span><span>3</span></span><span>3 gold badges</span><span title="38 silver badges" aria-hidden="true"><span></span><span>38</span></span><span>38 silver badges</span><span title="86 bronze badges" aria-hidden="true"><span></span><span>86</span></span><span>86 bronze badges</span>
        </p>
    </div>
</div>

            </div>
        </div>
    </div>
    
</div>




                
    </div>
</div>

                                          
<div id="answer-60515141" data-answerid="60515141" itemprop="suggestedAnswer" itemscope="" itemtype="http://schema.org/Answer">
    <div>
        

        

<div>
    
    <div itemprop="text">
<p>The standard library function <a href="https://docs.python.org/3/library/urllib.parse.html#urllib.parse.urlparse" rel="noreferrer">urllib.parse.urlsplit()</a> is all you need. Here is an example for Python3:</p>

<pre><code>&gt;&gt;&gt; import urllib.parse
&gt;&gt;&gt; o = urllib.parse.urlsplit('https://user:pass@www.example.com:8080/dir/page.html?q1=test&amp;q2=a2#anchor1')
&gt;&gt;&gt; o.scheme
'https'
&gt;&gt;&gt; o.netloc
'user:pass@www.example.com:8080'
&gt;&gt;&gt; o.hostname
'www.example.com'
&gt;&gt;&gt; o.port
8080
&gt;&gt;&gt; o.path
'/dir/page.html'
&gt;&gt;&gt; o.query
'q1=test&amp;q2=a2'
&gt;&gt;&gt; o.fragment
'anchor1'
&gt;&gt;&gt; o.username
'user'
&gt;&gt;&gt; o.password
'pass'
</code></pre>
    </div>
    <div>
        <div>
            


            <div>
                <div>
    <p>
        answered <span title="2020-03-03 20:38:22Z">Mar 3 at 20:38</span>
    </p>
    <div>
        <a href="/users/198219/famzah"><p><img src="https://i.stack.imgur.com/A3Mzf.jpg?s=32&amp;g=1" alt="" width="32" height="32"></p></a>
    </div>
    <div itemprop="author" itemscope="" itemtype="http://schema.org/Person">
        <p><a href="/users/198219/famzah">famzah</a><span itemprop="name">famzah</span></p><p><span title="reputation score " dir="ltr">746</span><span title="7 silver badges" aria-hidden="true"><span></span><span>7</span></span><span>7 silver badges</span><span title="14 bronze badges" aria-hidden="true"><span></span><span>14</span></span><span>14 bronze badges</span>
        </p>
    </div>
</div>

            </div>
        </div>
    </div>
    
</div>




                
    </div>
</div>

                                          
<div id="answer-9627834" data-answerid="9627834" itemprop="suggestedAnswer" itemscope="" itemtype="http://schema.org/Answer">
    <div>
        

        

<div>
    
    <div itemprop="text">
<p>This is a bit obtuse, but uses <code>urlparse</code> in both directions:</p>

<pre><code>import urlparse
def uri2schemehostname(uri):
    urlparse.urlunparse(urlparse.urlparse(uri)[:2] + ("",) * 4)
</code></pre>

<p>that odd <code>("",) * 4</code> bit is because urlparse expects a sequence of <em>exactly</em> <code>len(urlparse.ParseResult._fields)</code> = 6</p>
    </div>
    <div>
        <div>
            


            <div>
                <div>
    <p>
        answered <span title="2012-03-09 01:43:03Z">Mar 9 '12 at 1:43</span>
    </p>
    <div>
        <a href="/users/65696/singlenegationelimination"><p><img src="https://www.gravatar.com/avatar/d8da959b2a586b4a147604e6f534a9fe?s=32&amp;d=identicon&amp;r=PG" alt="" width="32" height="32"></p></a>
    </div>
    
</div>

            </div>
        </div>
    </div>
    
</div>




                
    </div>
</div>

                                          
<div id="answer-53112335" data-answerid="53112335" itemprop="suggestedAnswer" itemscope="" itemtype="http://schema.org/Answer">
    <div>
        

        

<div>
    
    <div itemprop="text">
<p>I know it's an old question, but I too encountered it today.
Solved this with an one-liner:</p>

<pre><code>import re
result = re.sub(r'(.*://)?([^/?]+).*', '\g&lt;1&gt;\g&lt;2&gt;', url)
</code></pre>
    </div>
    <div>
        <div>
            
            


            <div>
                <div>
    <p>
        answered <span title="2018-11-02 03:32:40Z">Nov 2 '18 at 3:32</span>
    </p>
    <div>
        <a href="/users/8290475/orix-au-yeung"><p><img src="https://i.stack.imgur.com/demPY.jpg?s=32&amp;g=1" alt="" width="32" height="32"></p></a>
    </div>
    
</div>

            </div>
        </div>
    </div>
    
</div>




                
    </div>
</div>

                                          
<div id="answer-62921821" data-answerid="62921821" itemprop="suggestedAnswer" itemscope="" itemtype="http://schema.org/Answer">
    <div>
        

        

<div>
    
    <div itemprop="text">
<p>You can simply use urljoin with relative root '/' as second argument:</p>
<pre><code>import urllib.parse


url = 'https://stackoverflow.com/questions/9626535/get-protocol-host-name-from-url'
root_url = urllib.parse.urljoin(url, '/')
print(root_url)
</code></pre>
    </div>
    <div>
        <div>
            
            


            <div>
                <div>
    <p>
        answered <span title="2020-07-15 18:47:20Z">Jul 15 at 18:47</span>
    </p>
    <div>
        <a href="/users/1431916/mirko"><p><img src="https://www.gravatar.com/avatar/d2e5d4d19baf9a65993a34e04c467a19?s=32&amp;d=identicon&amp;r=PG" alt="" width="32" height="32"></p></a>
    </div>
    <div itemprop="author" itemscope="" itemtype="http://schema.org/Person">
        <p><a href="/users/1431916/mirko">Mirko</a><span itemprop="name">Mirko</span></p><p><span title="reputation score " dir="ltr">1,459</span><span title="2 gold badges" aria-hidden="true"><span></span><span>2</span></span><span>2 gold badges</span><span title="14 silver badges" aria-hidden="true"><span></span><span>14</span></span><span>14 silver badges</span><span title="13 bronze badges" aria-hidden="true"><span></span><span>13</span></span><span>13 bronze badges</span>
        </p>
    </div>
</div>

            </div>
        </div>
    </div>
    
</div>




                
    </div>
</div>

                                          
<div id="answer-58719991" data-answerid="58719991" itemprop="suggestedAnswer" itemscope="" itemtype="http://schema.org/Answer">
    <div>
        

        

<div>
    
    <div itemprop="text">
<p>It could be solved by re.search()</p>

<pre><code>import re
url = 'https://docs.google.com/spreadsheet/ccc?key=blah-blah-blah-blah#gid=1'
result = re.search(r'^http[s]*:\/\/[\w\.]*', url).group()
print(result)

#result
'https://docs.google.com'
</code></pre>
    </div>
    <div>
        <div>
            


            <div>
                <div>
    <p>
        answered <span title="2019-11-05 21:49:35Z">Nov 5 '19 at 21:49</span>
    </p>
    <div>
        <a href="/users/10615468/kiwi"><p><img src="https://lh5.googleusercontent.com/-nq9J0A3c8CU/AAAAAAAAAAI/AAAAAAAAAAA/ABtNlbA04J98PlNLd9QNIhJc9NsCqREvRA/mo/photo.jpg?sz=32" alt="" width="32" height="32"></p></a>
    </div>
    <div itemprop="author" itemscope="" itemtype="http://schema.org/Person">
        <p><a href="/users/10615468/kiwi">kiwi</a><span itemprop="name">kiwi</span></p><p><span title="reputation score " dir="ltr">11</span><span title="1 bronze badge" aria-hidden="true"><span></span><span>1</span></span><span>1 bronze badge</span>
        </p>
    </div>
</div>

            </div>
        </div>
    </div>
    
</div>




                
    </div>
</div>

                                          
<div id="answer-54872637" data-answerid="54872637" itemprop="suggestedAnswer" itemscope="" itemtype="http://schema.org/Answer">
    <div>
        

        

<div>
    
    <div itemprop="text">
<p>to get domain/hostname and Origin*</p>

<pre><code>url = 'https://stackoverflow.com/questions/9626535/get-protocol-host-name-from-url'
hostname = url.split('/')[2] # stackoverflow.com
origin = '/'.join(url.split('/')[:3]) # https://stackoverflow.com
</code></pre>

<p>*<code>Origin</code> is used in <code>XMLHttpRequest</code> headers</p>
    </div>
    <div>
        <div>
            


            <div>
                <div>
    <p>
        answered <span title="2019-02-25 18:34:10Z">Feb 25 '19 at 18:34</span>
    </p>
    <div>
        <a href="/users/10767810/cieunteung"><p><img src="https://i.stack.imgur.com/2Nxdo.jpg?s=32&amp;g=1" alt="" width="32" height="32"></p></a>
    </div>
    <div itemprop="author" itemscope="" itemtype="http://schema.org/Person">
        <p><a href="/users/10767810/cieunteung">cieunteung</a><span itemprop="name">cieunteung</span></p><p><span title="reputation score " dir="ltr">1,117</span><span title="5 silver badges" aria-hidden="true"><span></span><span>5</span></span><span>5 silver badges</span><span title="11 bronze badges" aria-hidden="true"><span></span><span>11</span></span><span>11 bronze badges</span>
        </p>
    </div>
</div>

            </div>
        </div>
    </div>
    
</div>




                
    </div>
</div>

                                          
<div id="answer-50977302" data-answerid="50977302" itemprop="suggestedAnswer" itemscope="" itemtype="http://schema.org/Answer">
    <div>
        

        

<div>
    
    <div itemprop="text">
<p>If it contains less than 3 slashes thus you've it got and if not then we can find the occurrence between it:</p>

<pre><code>import re

link = http://forum.unisoftdev.com/something

slash_count = len(re.findall("/", link))
print slash_count # output: 3

if slash_count &gt; 2:
   regex = r'\:\/\/(.*?)\/'
   pattern  = re.compile(regex)
   path = re.findall(pattern, url)

   print path
</code></pre>
    </div>
    <div>
        <div>
            
            


            <div>
                <div>
    <p>
        answered <span title="2018-06-21 20:55:49Z">Jun 21 '18 at 20:55</span>
    </p>
    <div>
        <a href="/users/1290797/juraj"><p><img src="https://www.gravatar.com/avatar/dc432fed39e67aa18b74dd390eec3c5a?s=32&amp;d=identicon&amp;r=PG" alt="" width="32" height="32"></p></a>
    </div>
    <div itemprop="author" itemscope="" itemtype="http://schema.org/Person">
        <p><a href="/users/1290797/juraj">Juraj</a><span itemprop="name">Juraj</span></p><p><span title="reputation score " dir="ltr">42</span><span title="3 bronze badges" aria-hidden="true"><span></span><span>3</span></span><span>3 bronze badges</span>
        </p>
    </div>
</div>

            </div>
        </div>
    </div>
    
</div>




                
    </div>
</div>


                        



                            <h2 data-loc="1">
Not the answer you're looking for? Browse other questions tagged <a href="/questions/tagged/python" title="show questions tagged 'python'" rel="tag">python</a> <a href="/questions/tagged/django" title="show questions tagged 'django'" rel="tag">django</a>  or <a href="/questions/ask">ask your own question</a>.                            </h2>
                </div>
            </div></div>


title: How to get current URL in jinja2/flask (request.url not working)
url:
https://stackoverflow.com/questions/26276580/how-to-get-current-url-in-jinja2-flask-request-url-not-working

content:
<div id="readability-page-1" class="page"><div id="mainbar" role="main" aria-label="question and answers">

                
<div data-questionid="26276580" id="question">
    


    <div>
        

        

<div>
    
    <div itemprop="text">
                    
<p>Is there a way to print the current URL in Jinja2/Flask?</p>

<p>E.g. if the current URL is <code>http://www.domain.com/example/1/2</code></p>

<p><code>{{ request.path }}</code> works and prints <code>/example/1/2</code>, but how to I get the full URL with http:// as well?</p>

<p>From the docs <a href="http://flask.pocoo.org/docs/0.10/api/#flask.Request.url">(here)</a><code>{{ request.url }}</code> should work, but it doesn't yield anything.</p>

<p>Thanks</p>

<p><strong>UPDATE</strong></p>

<p>Here are the render/context args from views.py:</p>

<pre><code>class EventDetailView(EventObjectMixin, FormView):
    template_name = 'gig/public/about.html'
    context_object_name = 'event'
    form_class = EventPurchaseTicketForm

    def get_context_data(self, **kwargs):
        context = super(EventDetailView, self).get_context_data(**kwargs)

    ...

        return context
</code></pre>
    </div>

        

    <div>
        <div>
            

                
            <div>
                <div>
    <p>
        asked <span title="2014-10-09 10:52:49Z">Oct 9 '14 at 10:52</span>
    </p>
    <div>
        <a href="/users/2429989/alias51"><p><img src="https://www.gravatar.com/avatar/ad6e6bdbe09efccb343b96ce4d703dbc?s=32&amp;d=identicon&amp;r=PG" alt="" width="32" height="32"></p></a>
    </div>
    <div itemprop="author" itemscope="" itemtype="http://schema.org/Person">
        <p><a href="/users/2429989/alias51">alias51</a><span itemprop="name">alias51</span></p><p><span title="reputation score " dir="ltr">6,292</span><span title="19 gold badges" aria-hidden="true"><span></span><span>19</span></span><span>19 gold badges</span><span title="73 silver badges" aria-hidden="true"><span></span><span>73</span></span><span>73 silver badges</span><span title="130 bronze badges" aria-hidden="true"><span></span><span>130</span></span><span>130 bronze badges</span>
        </p>
    </div>
</div>

            </div>
        </div>
    </div>
    
</div>




                
    </div>
</div>




                <div id="answers">

                    


                                          
<div id="answer-48260874" data-answerid="48260874" itemprop="acceptedAnswer" itemscope="" itemtype="http://schema.org/Answer">
    <div>
        

        

<div>
    
    <p>You can use <code>{{ url_for(request.endpoint) }}</code>, it works.</p>
    <div>
        <div>
            


            <div>
                <div>
    <p>
        answered <span title="2018-01-15 10:16:20Z">Jan 15 '18 at 10:16</span>
    </p>
    <div>
        <a href="/users/6637900/hugoxia"><p><img src="https://www.gravatar.com/avatar/04b68e6b935c55e737115a4f25bf64a5?s=32&amp;d=identicon&amp;r=PG&amp;f=1" alt="" width="32" height="32"></p></a>
    </div>
    <div itemprop="author" itemscope="" itemtype="http://schema.org/Person">
        <p><a href="/users/6637900/hugoxia">hugoxia</a><span itemprop="name">hugoxia</span></p><p><span title="reputation score " dir="ltr">266</span><span title="3 silver badges" aria-hidden="true"><span></span><span>3</span></span><span>3 silver badges</span><span title="2 bronze badges" aria-hidden="true"><span></span><span>2</span></span><span>2 bronze badges</span>
        </p>
    </div>
</div>

            </div>
        </div>
    </div>
    
</div>




                
    </div>
</div>


                                          
<div id="answer-26277062" data-answerid="26277062" itemprop="suggestedAnswer" itemscope="" itemtype="http://schema.org/Answer">
    <div>
        

        

<div>
    
    <div itemprop="text">
<p>Find where you have similar code to this, usually found in <em>controller.py</em> or <em>__ init__.py</em> or <em>views.py</em> :</p>

<pre><code>from flask import render_template
...

@app.route('/example/&lt;arg1&gt;/&lt;arg2&gt;')
def some_view_function(arg1, arg2):
    ...

    return render_template('path/to/your/template.html')
</code></pre>

<p>With <code>render_template()</code> are request and other variables available to you. </p>
    </div>
    <div>
        <div>
            


            <div>
                <div>
    <p>
        answered <span title="2014-10-09 11:18:51Z">Oct 9 '14 at 11:18</span>
    </p>
    <div>
        <a href="/users/3678682/gcerar"><p><img src="https://www.gravatar.com/avatar/72d352c78b9bc53e76a7e3f3d9064d1f?s=32&amp;d=identicon&amp;r=PG&amp;f=1" alt="" width="32" height="32"></p></a>
    </div>
    <div itemprop="author" itemscope="" itemtype="http://schema.org/Person">
        <p><a href="/users/3678682/gcerar">gcerar</a><span itemprop="name">gcerar</span></p><p><span title="reputation score " dir="ltr">770</span><span title="1 gold badge" aria-hidden="true"><span></span><span>1</span></span><span>1 gold badge</span><span title="9 silver badges" aria-hidden="true"><span></span><span>9</span></span><span>9 silver badges</span><span title="24 bronze badges" aria-hidden="true"><span></span><span>24</span></span><span>24 bronze badges</span>
        </p>
    </div>
</div>

            </div>
        </div>
    </div>
    
</div>




                
    </div>
</div>


                        



                            <h2 data-loc="1">
Not the answer you're looking for? Browse other questions tagged <a href="/questions/tagged/python" title="show questions tagged 'python'" rel="tag">python</a> <a href="/questions/tagged/flask" title="show questions tagged 'flask'" rel="tag">flask</a> <a href="/questions/tagged/jinja2" title="show questions tagged 'jinja2'" rel="tag">jinja2</a>  or <a href="/questions/ask">ask your own question</a>.                            </h2>
                </div>
            </div></div>


url: https://ygorganization.com/cyberdragon101ocg/
title: The Organization | [Deck Recipes] “Cyber Dragon” Analysis by Instructors
byline: NeoArkadia
content:
<div class="page" id="readability-page-1"><div><p>It turns out high speed attacks and a lot of negates are good.</p><p></p><p>Instructors’ Speculation About Popular Decks: Cyber Dragon</p><p>&lt;Reasons For Its Popularity&gt;</p><p>■ Thanks to “Cyber Dragon Nova” whose effect activates if sent to the GY, as well as “Cyber Dragon Sieger” (who is treated as “Cyber Dragon” while in the GY, this Deck has a fantastic match-up against Dragma. If it has to go second, it can adjust which attacks to make and how quickly depending on the opponent’s speed. – ソーイチ ・ロウ</p><p>■ It’s a Deck whose Deck Power is incredibly well balanced to deal with going first and second. If it goes first, it can bring out “Red-Eyes Dark Dragoon” and “Cyber Dragon Infinity”. If you go second, use the high ATK of Cyber Dragons and their ability to attack multiple times to let you crush the opponent immediately, while also utilizing cards to suppress the opponent’s. – ゴッツ</p><p></p><p>Deck 1: “Cyber Dragon” Deck</p><p>3 Cyber Dragon 3 Cyber Dragon Core 3 Cyber Dragon Nachster 3 Cyber Dragon Herz 2 Galaxy Soldier 1 Jizukiru, the Star Destroying Kaiju 3 Ash Blossom &amp; Joyous Spring</p><p>1 Power Bond 3 Limiter Removal 1 Harpie’s Feather Duster 3 Just One Forbidden Drop 3 Cyber Emergency 2 Cyber Repair Plant 1 Cyber Revsystem 2 Machine Duplication 2 Overload Fuson 2 Lightning Storm 2 Three Tactical Talents</p><p>1 Predaplant Verte Anaconda 2 Cyber Dragon Sieger 2 Cyber Dragon Nova 2 Cyber Dragon Infinity 2 Chimeratech Rampage Dragon 1 Chimeratech Fortress Dragon 1 Chimeratech Megafleet Dragon 1 Qliphort Genius 1 Salamangreat Almiraj 1 Cyber Twin Dragon1 1 Cyber End Dragon</p><p>Side Deck:</p><p>3 Rivalry of Warlords 3 Inspector Boarder 1 Cybernetic Overflow 1 Vanity’s Emptiness 1 Imperial Order 3 Heat Wave 3 Dimensional Barrier</p><p>Sample Deck Concept</p><p>Aim to seize victory by Fusion Summoning “Chimeratech Rampage Dragon” and using its effect to attack multiple times.</p><p>This Deck shines brightest when it goes second, so if you end up going first in the match, supplement your Deck with a ton of cards from your Side Deck to make it go first.</p><p></p><p>Deck 2: “Cyber Dragon” Deck</p><p>1 Red-Eyes Black Dragon 1 Dark Magician 3 Cyber Dragon 3 Cyber Dragon Core 3 Cyber Dragon Nachster 3 Cyber Dragon Herz 1 Cyber Dragon Vier 3 Galaxy Soldier 1 Lava Golem 1 Ghost Ogre &amp; Snow Rabbit</p><p>3 Cyber Emergency 3 Machine Duplication 1 Cyber Revsystem 1 Cyber Repair Plant 1 Cyberload Fusion 2 Overload Fusion 1 Power Bond 2 Called by the Grave 1 Red-Eyes Fusion 2 One for One</p><p>1 Cybernetic Overflow 2 Infinite Impermanence</p><p>1 Red-Eyes Dark Dragoon 1 Chimeratech Megafleet Dragon 1 Chimeratech Fortress Dragon 1 Cyber End Dragon 1 Cyber Twin Dragon 2 Chimeratech Rampage Dragon 2 Cyber Dragon Infinity 2 Cyber Dragon Nova 1 Cyber Dragon Sieger 1 Platinum Gadget 1 Salamangreat Almiraj 1 Predaplant Verte Anaconda</p><p>Sample Deck Concept</p><p>While chiefly centered around “Cyber Dragon” monsters, it also makes use of “Red-Eyes Dark Dragoon” who has a powerful effect.</p><p>By bringing out both it and “Cyber Dragon Infinity” when you go first, you’ll be able to heavily restrict your opponent’s options.</p></div></div>


title: How I Modded the Silicone Tips of AirPods Pro with a Memory Foam Layer
byline: Federico Viticci
url:
https://www.macstories.net/stories/how-i-modded-the-silicone-tips-of-airpods-pro-with-a-memory-foam-layer/

content:
<div class="page" id="readability-page-1"><div><p id="p2">I love my AirPods Pro and, ever since I bought them last October, I’ve been taking advantage of their noise cancellation technology to use them in more contexts than the original AirPods.1 They sound better than any other wireless earbuds I’ve tested (obviously, they sound much worse than my Sony IER-Z1R, but that’s to be expected) and they cancel almost as much noise as my Sony WH-1000XM3, which is pretty remarkable for such tiny earbuds. AirPods Pro retain all the magic of the non-Pro line, but they bring the additional freedom granted by noise cancellation and transparency mode. There’s one thing I don’t particularly like about them, though: the default silicone tips.</p><p id="p3">Unlike others (e.g. my girlfriend), I can use in-ear silicone tips without getting a headache after 20 minutes. It’s not my favorite method of listening to music, however, because I know that memory foam tips are a better fit for my ears since they can better adapt to the shape of my ear canal and, as a result, provide better isolation and a more bass-y response. Over the years, I’ve developed an appreciation for Comply’s popular foam tips (right now, I’m testing their Audio Pro and Comfort tips with my IER-Z1R) and was hoping they’d release AirPods Pro-compatible tip replacements made of memory foam.</p><p id="p4">Much to my disappointment, the only foam tips designed for AirPods Pro I’ve found so far are these no-brand tips from Amazon US that I can’t purchase from Italy (and which do not inspire a lot of confidence). I’m assuming that since AirPods Pro require tips to have a special clip attachment that secures them onto the earbuds themselves, it’s taking a while for third-party manufacturers to come up with a compatible design. I really wanted to figure out a way to use foam tips with my AirPods Pro though, so I kept looking for ideas or recommendations on how to make it happen.</p><p id="p5">The solution I’ve adopted isn’t ideal since I still haven’t found complete foam replacements made specifically for AirPods Pro, but, at least for me, what I’m using today is better than using Apple’s default silicone tips. As I shared on Twitter a few days ago, I’ve modded the AirPods Pro’s silicone tips with an extra memory foam layer, which helps the tips fit better in my ears, resulting in a warmer sound and overall more comfortable feel. The best part: I didn’t have to cut the memory foam layer myself – I simply took the foam layer from a pair of Symbio W eartips and fitted it inside the AirPods Pro’s tips. The final result looks like this:</p><p id="p8">Allow me to offer some context around how I discovered this method and how you can perform this mod yourself with relative ease. I was looking around for discussions related to AirPods Pro and memory foam tips a few weeks back, and I came across this discussion thread on the MacRumors forums where a few users reached the following consensus: until third-party manufacturers come up with a compatible clip that attaches to AirPods Pro and lets you use alternative tips, for now the best DIY mod involves taking a memory foam insert and sliding Apple’s silicone tips inside it so that the foam layer ends up sitting between the central plastic “stem” of the tip and its outer layer. This is what I mean:</p><p id="p10">Based on the aforementioned MacRumors thread, I purchased a set of Symbio W eartips from Amazon Japan2 (Symbio also has an official website with worldwide shipping, but I haven’t tried it myself). Symbio’s in-ear tips are well suited for this kind of mod for a couple reasons. First, they’re hybrid tips that feature a silicone membrane with an inner memory foam layer; if you pull out the silicone part, you can access the memory foam “ring” contained inside it and remove it so you can use it elsewhere. And second, the Symbio W’s foam layer is thin and short enough that it can fit in the gap between the plastic stem and silicone layer in Apple’s tips, while matching their height in all three sizes as well (just like AirPods Pro, the Symbio W eartips come in small, medium, and large sizes). This means that, unlike other mods, applying the Symbio W’s foam parts to AirPods Pro’s silicone tips will let the AirPods Pro case close just fine.</p><p id="p11">Now, if you want to replicate this setup yourself, here’s how you can do it in less than a minute for each AirPod. Grab one of the Symbio eartips (if you’re using the medium tips for your AirPods Pro, use the medium Symbio tip too) and pull out the silicone exterior so that the memory foam portion is clearly visible:</p><p id="p13">Next, gently remove the memory foam ring from the eartip:</p><p id="p15">Grab the tip of your AirPods Pro and pull out the soft silicone part – again, don’t apply too much pressure because you don’t want to break it – so that it looks like this:</p><p id="p17">Slide the plastic base of the AirPods’ tip into the foam ring, then carefully adjust it so that it doesn’t cover the vents (which help relieve pressure in your inner ear), as pictured below:</p><p id="p19">Lastly, pull down the outer silicone layer of the AirPods’ tip so it covers the newly inserted foam part, adjust the foam again so it doesn’t cover the vents, and voila:</p><p id="p21">Now, obviously this is a DIY modification and it’s by no means an absolutely perfect match for Apple’s design – but it’s a close approximation that has helped me enjoy some of the benefits of memory foam tips despite the fact that I still have to use Apple’s official tips.</p><p id="p23">I’ve been rocking this setup for the past week, and not only do I find my AirPods Pro more comfortable to wear for prolonged listening sessions because the tips fit better in my ears and don’t wobble as much as before, but sound isolation is also better (as confirmed by Apple’s fit test in Settings). Thanks to the extra foam layer, the modded tips “fill” my ears, creating a better seal and ensuring the AirPods stay in place. As a result of the superior fit, I’ve also noticed a slightly warmer sound with a bit more bass than before, which I believe is a pleasant addition. Best of all, my right AirPod always stays in place now (which wasn’t the case before the mod) and the additional foam layer hasn’t been an issue for the case, which still closes perfectly.</p><p id="p24">I recognize that after spending $249 on AirPods Pro, I shouldn’t have to invest roughly $18 (plus shipping) on a mod that only sort-of lets me use foam tips with them. Apple should provide users with more choice in terms of the materials used in the default tips: ideally, for $249 the company should offer a selection of silicone and memory foam tips in the box. But I also like my AirPods Pro a lot, and I use them for several hours every day, and I wanted to make them fit my ears better today. I’m pretty happy with this temporary mod; until a better solution comes along3, Symbio’s W eartips have proven to be good companions to Apple’s silicone tips, and I recommend them.</p></div></div>


url: https://drewdevault.com/2020/10/22/Firefox-the-embarassment-of-FOSS.html
title: The Jewel^WEmbarassment of Open Source
content:
<div class="page" id="readability-page-1"><div><article><p>Circa 2006, the consensus on Firefox was concisely stated by this classic xkcd:</p><p></p><p>This feeling didn’t last. In 2016, I wrote In Memoriam - Mozilla, and in 2017, Firefox is on a slippery slope. Well, I was right, and Firefox (and Mozilla) have only become worse since. The fuck-up culture is so ingrained in Mozilla in 2020 that it’s hard to see it ever getting better again.</p><p>In the time since my last article on the subject, Mozilla has:</p><ul><li>Laid off 25% of its employees, mostly engineers, many of whom work on Firefox1</li><li>Raised executive pay 400% as their market share declined 85%2</li><li>Sent a record of all browsing traffic to CloudFlare by default3</li><li>Added advertisements to the new tab page on Firefox4</li><li>Used their brand to enter the saturated VPN grift market5</li><li>Built a walled garden for add-ons, then let the walls crash in6</li><li>Started, and killed, a dozen projects which were not Firefox7</li></ul><p>The most interesting things they’ve been involved in in the past few years are Rust and Servo, and they fired most or all of their engineers involved in both. And, yesterday, Mozilla published a statement siding with Google on anti-trust, failing to disclose the fact that Google pays to keep their lights on.</p><p>Is this the jewel of open source? No, not anymore. Firefox is the embarrassment of open source, and it’s the only thing standing between Google and an all-encompassing monopoly over the web. Mozilla has divested from Firefox and started funnelling what money is left out of their engineering payroll and into their executive pockets. The web is dead, and its fetid corpse persists only as the layer of goop that Google scrapes between its servers and your screen. Anyone who still believes that Mozilla will save the web is a fool.</p><p>As I have stated before, the scope of web browsers has been increasing at a reckless pace for years, to the point where it’s literally impossible to build a new web browser. We have no recourse left to preserve the web. This is why I’m throwing my weight behind Gemini, a new protocol which is much simpler than the web, and which you can implement yourself in a weekend.</p><p>Forget about the web, it’s a lost cause. Let’s move on.</p></article><section><h2>Articles from blogs I read<small>Generated by<a href="https://git.sr.ht/~sircmpwn/openring">openring</a></small></h2><section><div><h4><a href="https://sourcehut.org/blog/2020-10-29-how-mailing-lists-prevent-censorship/" rel="noopener" target="_blank">Mailing lists are resistant to censorship</a></h4><p>As a US entity, SourceHut is obliged to comply with DMCA notices. In this event, our next step would likely be to coach the affected project through the counter-notice process, and contribute to their legal costs if we believe that they’re in the right. We k...</p><p>via Blogs on Sourcehut October 29, 2020</p></div><div><h4><a href="https://blog.golang.org/survey2020" rel="noopener" target="_blank">Announcing the 2020 Go Developer Survey</a></h4><p>Help shape the future of Go Since 2016, thousands of Gophers around the world have helped the Go project by sharing their thoughts via our annual Go Developer Survey. Your feedback has played an enormous role in driving changes to our langu...</p><p>via The Go Programming Language Blog October 20, 2020</p></div><div><h4><a href="https://emersion.fr/blog/2020/status-update-22/" rel="noopener" target="_blank">Status update, October 2020</a></h4><p>Hi all, it’s been a while! I’ve been taking some time off this month: I’ve been hiking in Corsica (an island in the south of France) for 2 weeks! The path (called GR20) was very difficult but the gorgeous landscapes made it entirely worth it. :) I’ve uploaded...</p><p>via emersion October 16, 2020</p></div></section></section></div></div>


url: https://www.hanselman.com/blog/how-to-deal-with-extreme-physical-pain
title: How to deal with Extreme Physical Pain
byline: Scott Hanselman
content:
<div id="readability-page-1" class="page"><section>
            
            <p><a href="https://hanselmanblogcontent.azureedge.net/Windows-Live-Writer/Exploring-Personal-Pain_CC4B/francisco-gonzalez-M8UEJd58GcE-unsplash_2.jpg"><img title="francisco-gonzalez-M8UEJd58GcE-unsplash" alt="francisco-gonzalez-M8UEJd58GcE-unsplash" src="https://hanselmanblogcontent.azureedge.net/Windows-Live-Writer/Exploring-Personal-Pain_CC4B/francisco-gonzalez-M8UEJd58GcE-unsplash_thumb.jpg" width="482" height="322"></a>I'm in a LOT of pain right now. It's hard to say that, especially considering that everyone experiences pain be it emotional or physical. I don't want to make unneeded comparisons or consider my pain as being more important than anyone else's. I'm not burned. I'm not dying of cancer. I am blessed. </p> <p>But I'm hurting. A lot. It's mine and it's now and it's not clear when it will stop.</p> <p>It's hard to think. It's hard to move. I can't sleep. Oxycodone makes me feel sick. Advil does nothing. </p> <p>I've just had my second frozen shoulder surgery (adhesive capsular release) in 4 years. Frozen shoulder is idiopathic (who knows why it happen) and it's known to be quite painful. I can attest that it is. I've been unable to move my right arm for nearly a year. Not just that <strong>I </strong>couldn't move it, I mean it couldn't be moved by anyone. I couldn't fit the deodorant in to my armpit because the whole joint was hardened.</p> <p>I had cortisone shots. No result. I finally had formal capsular release surgery where the surgeon goes in there and tidies up, removes scar tissue. </p> <p>Then the months of physical therapy and forced stretching starts. </p> <p>I'm going to physical therapy five days a week for an hour a day, and working at home stretching myself for an other 1-2 hours. It's overwhelming and consuming. I just want to be able to pick up a cup from a high shelf. I have basic arm-usage requirements. This is going to be a marathon, and this is the second time this has happened.</p> <h3>Why am I telling you this? </h3> <p>A few reasons. I need the outlet. It's my blog. Because I appreciate you all and you've been here, some of you, for nearly 20 years. Not everything is code.</p> <p>I had a nerve block in my neck that turned off my right side for a week. That was an extraordinary experience as it was an opportunity to experience a significant, albeit temporary, physical disability. Before I had no ability to move my arm but I had feeling. Now I had zero use of my right arm. It was a numb cadaver arm - dangerously dead weight. I used the time to <a href="https://www.youtube.com/watch?v=fjE4I1XNzRs&amp;t=61s">play Xbox with my feet using the Xbox Adaptive Controller</a>.</p> <p>This nerve block is wearing off and it's gone from itching, to tingling, to the feeling of an ice pick shoved into my deltoid and armpit every few minutes. </p> <p>I burst into tears at physical therapy today. The year just hit me all at once. It hurts. Between diabetes and this temporary paralysis, it’s been a week. 2020 is ass. It’s OK. Happens a few times a decade. Maybe it happens to you twice a week. Let it out, listen to your body.</p> <h3>Why am I telling you this?</h3> <p>It's OK to tell people you hurt. You're human. Talk about your pain. Cry. Yell. Sob. Talk some more. </p> <p>When I'm done yelling, I'm trying to sit quietly and meditate about this pain. What is it trying to tell me? Can I mentally follow the nerve from the location (referred pain or otherwise) to my brain and determine what the body wants me to know? Am I being told there's danger? </p> <p>I'm finding that there is soft tissue tolerance - what I can handle - and that doesn't always line up with what I'm feeling. I'm feeling near intolerable pain in PT (physical therapy). Like torture with an unknown end date, it's taken me to the level of pain where vomiting is the only escape and then it starts again. However, I persist. I breathe. I try to listen and trust the process and know that if I want to regain the full use of my arms, this is a medically known and studied process. Physical therapy works if you do it.</p> <p>The cognitive dissonance is overwhelming. Your body says you're actively dying but your conscious brain can - must - override it and let the pain flow freely. You observe it, rather than obstruct it. </p> <p>I hate this process but I'm going to learn from it. I'm learning and listening to my body and how I react to something so extreme.</p> <p>The pain is important to acknowledge because this pain is gonna make me better and stronger. But it still hurts. Here we go.</p> <p>I hope that you, Dear Reader, are not in pain. But if you are, I hope it passes and that you come out better on the other side. I'm going to use this Bad Input for Good.</p> <p><em>BTW: Thanks to Volterra for sponsoring the blog this week. I suspect they didn't know what blog post(s) their ad would land on, but I appreciate their support and understanding as not every blog post is about code. This one is about people and their pain. Give them a click.</em></p> <hr>  <p><strong>Sponsor: </strong>Need a multi-cluster load balancer and API gateway? Try VoltMesh: built for modern and distributed apps that require automation, performance and visibility. <a href="https://hnsl.mn/3mEy8QJ">Start for free today</a>.</p>



            <div>
                <div>
                    <h4>About Scott</h4>
                    <div>
                        <p>Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.</p>
                        <p><a href="https://facebook.com/shanselman"><img src="https://images.hanselman.com/main/icon-fb.png" alt="facebook"></a>
                        <a href="https://twitter.com/shanselman"><img src="https://images.hanselman.com/main/icon-twitter.png" alt="twitter"></a>
                        <a href="http://feeds.hanselman.com/ScottHanselman"><img src="https://images.hanselman.com/main/icon-rss.png" alt="subscribe"></a><br>
                        <a href="http://hanselman.com/about">About</a> &nbsp; <a href="http://www.hanselman.com/newsletter">Newsletter</a>
                    </p></div>
                </div>

                <div>
                    <p><strong>Hosting By</strong><br>
                        <a rel="nofollow" href="https://azure.microsoft.com/free"><img alt="Hosted in an Azure App Service" width="125" height="125" src="https://images.hanselman.com/main/azure-250x250.png"></a>
                    </p>

                </div>
            </div>

            


            

            
        </section></div>


