<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: ARG</title>
    <description>The latest articles on DEV Community by ARG (@256kilobytes).</description>
    <link>https://dev.to/256kilobytes</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F167605%2F2fce643d-7e71-4505-98c0-27c9d2adc3fd.png</url>
      <title>DEV Community: ARG</title>
      <link>https://dev.to/256kilobytes</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/256kilobytes"/>
    <language>en</language>
    <item>
      <title>5 Tasks You Didn't Know Could be Done from the Developer Console</title>
      <dc:creator>ARG</dc:creator>
      <pubDate>Sat, 01 Jun 2019 09:56:32 +0000</pubDate>
      <link>https://dev.to/256kilobytes/5-tasks-you-didn-t-know-could-be-done-from-the-developer-console-oo6</link>
      <guid>https://dev.to/256kilobytes/5-tasks-you-didn-t-know-could-be-done-from-the-developer-console-oo6</guid>
      <description>&lt;p&gt;&lt;em&gt;Note: The &lt;a href="https://www.256kilobytes.com/content/show/10378/5-tasks-you-didnt-know-could-be-done-from-the-developer-console"&gt;original/canonical version of this post&lt;/a&gt; includes a few of these demos built into the webpage['s console] via script tags.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;As they say, no one uses more than ten percent of any piece of software’s features, but everyone uses a different ten percent.&lt;/p&gt;

&lt;p&gt;Similarly to &lt;a href="https://www.256kilobytes.com/content/show/4399/get-these-dependencies-off-my-lawn-5-tasks-you-didnt-know-could-be-done-with-pure-html-and-css"&gt;HTML and CSS&lt;/a&gt;, as well as &lt;a href="https://www.256kilobytes.com/content/show/4429/spit-in-the-face-of-god-five-tasks-you-didn-t-know-could-be-done-with-google-sheets"&gt;Google Sheets&lt;/a&gt;, the browser’s developer console has a number of tricks that can be used that you probably didn’t know about.&lt;/p&gt;

&lt;h2&gt;
  
  
  Intro
&lt;/h2&gt;

&lt;p&gt;For those of you new to the console, it is a debugging tool built into various browsers' development tools. Here’s a crash course:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Right Click -&amp;gt; Inspect Element&lt;/li&gt;
&lt;li&gt;  From the window that’s just opened, find the tab labeled "console"; the layout varies between browsers&lt;/li&gt;
&lt;li&gt;  Type this into the console and press enter:

&lt;ul&gt;
&lt;li&gt;  &lt;code&gt;console.log("Some Text");&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Congratulations. You are a hacker and can follow along with the rest of this article.&lt;/p&gt;

&lt;h2&gt;
  
  
  Custom CSS for console.log()
&lt;/h2&gt;

&lt;p&gt;A standard console.log() statement looks like this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;code&gt;console.log("asdf")&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Starting a console.log() command with %c allows for arbitrary CSS to be injected as a second parameter, such as what is done here with this command:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;console.log("%c adsf", "color:blue;font-size:600%;")

// This command also works (space not required):
console.log("%cadsf", "color:blue;font-size:600%;")

// Which allows you to do shit like:
console.log("%cGOOD JOB OPENING THE CONSOLE", "color:brown;font-weight:bold;font-size:600%;");
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h2&gt;
  
  
  Edit Any Content on a Webpage
&lt;/h2&gt;

&lt;p&gt;Sometimes, you have to edit webpages for debugging purposes or to make fake screenshots. While you can do this fairly easily from the developer console, the &lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/contenteditable"&gt;contenteditable property&lt;/a&gt;, which can be used &lt;a href="https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Editable_content"&gt;to make content editable&lt;/a&gt;, makes this even easier to do. Enter the following line of code to the developer console to make the entire page editable:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  document.body.contentEditable=true&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  console.table()
&lt;/h2&gt;

&lt;p&gt;Similarly to console.log(), &lt;a href="https://developer.mozilla.org/en-US/docs/Web/API/Console/table"&gt;the console.table() function&lt;/a&gt; can be used to display arbitrary data in the developer console. The function, which takes in arrays, objects, JSON, and other values, can be used to display tables of data. For example, this:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;console.table({"Idaho":1751000, "Texas":28700000, "Maine":1338000})
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Will display a table of the key-value pairs passed into the function as JSON data.&lt;/p&gt;

&lt;p&gt;Similarly, &lt;a href="https://developer.mozilla.org/en-US/docs/Web/API/Console/group"&gt;console.group()&lt;/a&gt;, &lt;a href="https://developer.mozilla.org/en-US/docs/Web/API/Console/groupEnd"&gt;console.groupEnd()&lt;/a&gt;, and &lt;a href="https://developer.mozilla.org/en-US/docs/Web/API/Console/groupCollapsed"&gt;console.groupCollaposed()&lt;/a&gt; can be used for better organization of debugging messages output to the console.&lt;/p&gt;

&lt;h2&gt;
  
  
  Data Extraction
&lt;/h2&gt;

&lt;p&gt;For example, if you want to extract all of the URLs from a webpage, you can use the following command:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var t = document.querySelectorAll("a");
var output = {};
for (var iii = 0; iii &amp;lt; t.length; ++iii) {
output[ iii ] = t[iii].getAttribute('href');
} console.table(output);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Or if you want to get slightly more advanced, you can use this command to get a table with innerHTML and rel data as well:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var t = document.querySelectorAll("a");
var output = {};
for (var iii = 0; iii &amp;lt; t.length; ++iii) {
output[iii] = {"href":t[iii].getAttribute('href'), "rel":t[iii].getAttribute('rel'), "innerHTML":t[iii].innerHTML};
} console.table(output);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
  
  
  Shorthand Data Extraction
&lt;/h3&gt;

&lt;p&gt;Since there are basically limitless possibilities as to what you can scrape from the console, it’s useful to know that there are shorthands for the querySelector and querySelectorAll methods. Specifically:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  $('a') is the same as document.querySelector('a')&lt;/li&gt;
&lt;li&gt;  $$('a') is the same as document.querySelectorAll('a'), with the exception that &lt;a href="https://gomakethings.com/dev-console-trick-selector-helpers/"&gt;$$ returns an array instead of a NodeList&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Remove CSS and Other Headers
&lt;/h2&gt;

&lt;p&gt;The &lt;em&gt;head&lt;/em&gt; tag can be used to include various helpful pieces of information, or it can be used to inject garbage. If you’re on some other website and you want to remove their stylesheets, JavaScript, and other headers, you can do this by executing the following command from the console:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;document.head.parentNode.removeChild(document.head);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Among other things, this can be used to prevent those "pls pay us $1 per month to read D-tier fluff stories" messages from loading in a few seconds after the initial pageload on various tabloids.&lt;/p&gt;

&lt;h2&gt;
  
  
  Honorable Mentions
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;  Similarly to console.log(), &lt;a href="https://developer.mozilla.org/en-US/docs/Web/API/Console/info"&gt;console.info()&lt;/a&gt;, &lt;a href="https://developer.mozilla.org/en-US/docs/Web/API/Console/warn"&gt;console.warn()&lt;/a&gt;, and &lt;a href="https://developer.mozilla.org/en-US/docs/Web/API/Console/error"&gt;console.error()&lt;/a&gt; can be used to display data to the console at various levels of importance.&lt;/li&gt;
&lt;li&gt;  Stupid shit, like &lt;a href="https://www.256kilobytes.com/content/show/3250/how-to-make-a-cookie-clicker-bot"&gt;autoclicking in Cookie Clicker&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://developer.mozilla.org/en-US/docs/Web/API/Console/time"&gt;console.time()&lt;/a&gt; and &lt;a href="https://developer.mozilla.org/en-US/docs/Web/API/Console/timeEnd"&gt;console.timeEnd()&lt;/a&gt; can be used to time performance.&lt;/li&gt;
&lt;li&gt;  Refer to the last input’s result with &lt;code&gt;$_&lt;/code&gt;. Ex:

&lt;ul&gt;
&lt;li&gt;  Enter "&lt;code&gt;10*12&lt;/code&gt;" into the console&lt;/li&gt;
&lt;li&gt;  Then enter &lt;code&gt;$_&lt;/code&gt; after submitting that command as a shortcut to refer to that result.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;  You can (at least in FireFox and Chrome) use a dark theme instead of a light theme through the settings menu. &lt;a href="https://www.clipartmax.com/middle/m2H7K9G6m2N4N4H7_gun-in-mouth-emoji/"&gt;HA HA LMAO DAE USE THE DARK THEME?!&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  In Conclusion
&lt;/h2&gt;

&lt;p&gt;Congratulations. You now know some debugging tricks that you didn’t know previously, unless you did. Now you can ignore them to continue to use alert("asdfjla").&lt;/p&gt;

&lt;p&gt;Feel free to comment below with additional tricks and/or complaints about muh Safari.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
    </item>
    <item>
      <title>6 Open-Source Alternatives to Proprietary Software: Self-Hosted Applications</title>
      <dc:creator>ARG</dc:creator>
      <pubDate>Fri, 31 May 2019 07:46:51 +0000</pubDate>
      <link>https://dev.to/256kilobytes/6-open-source-alternatives-to-proprietary-software-self-hosted-applications-52n6</link>
      <guid>https://dev.to/256kilobytes/6-open-source-alternatives-to-proprietary-software-self-hosted-applications-52n6</guid>
      <description>&lt;p&gt;Using FOSS software is a great way of getting free access to valuable services and retaining your privacy and independence when you do it. Whether you’re running your own business on a tight budget or just want to use social media without fear of corporations stockpiling your personal info, there are tons of free and open source alternatives to the mainstream proprietary software that you’re probably used to.&lt;/p&gt;

&lt;p&gt;FOSS software also fosters communities and the sharing of knowledge. For those that have the hardware and time,&amp;nbsp;there are tons of benefits to self-hosting sites built on open-source software. Here are 6 of the best open-source, self-hosted applications and how they compare to their proprietary counterparts.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;For Part 2 of this article (FOSS Desktop Apps), &lt;a href="https://www.256kilobytes.com/content/show/10548/7-more-open-source-alternatives-to-proprietary-software-desktop-applications"&gt;click here&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  6 Open-Source Alternatives to Proprietary Software
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Matomo (vs Google Analytics)
&lt;/h2&gt;

&lt;p&gt;Formerly known as Piwik, &lt;a href="https://matomo.org/"&gt;Matomo&lt;/a&gt; is a web analytics application that, as of June 2018, was used by over 1,455,000 websites to track online visits and generate analytical reports. Although the standard version of &lt;a href="https://analytics.google.com/analytics/web/"&gt;Google Analytics&lt;/a&gt; is free, using it entails that your data is shared with Google, which you may or may not have an issue with. Meanwhile, if you want to spring for Google Analytics 360 (which, let’s be honest, is unnecessary), the price jumps up to an astounding $150,000 per year.&lt;/p&gt;

&lt;p&gt;With Matomo, you have the option to &lt;a href="https://github.com/matomo-org/"&gt;download the program for free&lt;/a&gt; and self-host &lt;a href="https://matomo.org/pricing/"&gt;or pay for the hosted version&lt;/a&gt;. Matomo has many of the same features as Google Analytics, such as metrics on the number of people visiting your websites, what pages visitors are coming from, their geographic location, bounce pages, &lt;a href="https://matomo.org/features/"&gt;and more&lt;/a&gt;. Matomo also integrates with&amp;nbsp;over 100 content management systems, forum platforms, and e-commerce shops, including things like &lt;a href="https://wordpress.com/"&gt;WordPress&lt;/a&gt; and &lt;a href="https://marvel.fandom.com/wiki/Max_Eisenhardt_(Earth-616)"&gt;Magento&lt;/a&gt;. With Matomo you don’t risk having your data shared with third parties.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=yA2NUur0770"&gt;https://www.youtube.com/watch?v=yA2NUur0770&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For more info, see &lt;a href="https://www.256kilobytes.com/content/show/2384/is-slimstat-a-decent-wp-plugin-for-site-analytics#2974"&gt;this thread&lt;/a&gt; discussing site analytics software.&lt;/p&gt;

&lt;h2&gt;
  
  
  Mastodon (vs Twitter)
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://joinmastodon.org/"&gt;Mastodon&lt;/a&gt; is a free and &lt;a href="https://github.com/tootsuite/mastodon"&gt;open-source&lt;/a&gt; social media network with an interface very much like &lt;a href="https://twitter.com/?lang=en"&gt;Twitter&lt;/a&gt;. Users can post “Toots” (not Tweets) of text, images, or videos and reply to or boost (re-Tweet) other Toots.&lt;/p&gt;

&lt;p&gt;Although Tweets have a restrictive 140 character limit, Mastodon users can include up to 500 characters in a Toot, as well as include a content warning or special privacy settings if needed.&lt;/p&gt;

&lt;p&gt;Aside from being open-source, Mastodon is also decentralized, meaning that the network is comprised of independent Mastodon instances. Servers can be kept private for more focused communities, and users can choose to sort their timelines by either their local server or the federated view of all Toots coming onto your server from other instances.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=IPSbNdBmWKE"&gt;https://www.youtube.com/watch?v=IPSbNdBmWKE&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There are plenty of cool things about Mastodon, and it seems to be steadily growing in popularity. More info about Mastodon can be found in &lt;a href="https://www.256kilobytes.com/content/show/4907/what-is-mastodon-the-open-source-social-media-network"&gt;this thread&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  PeerTube (vs YouTube)
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://joinpeertube.org/"&gt;PeerTube&lt;/a&gt; is a platform that offers an&amp;nbsp;alternative to proprietary video sharing platforms such as &lt;a href="https://www.youtube.com/"&gt;YouTube&lt;/a&gt;, &lt;a href="https://vimeo.com/"&gt;Vimeo&lt;/a&gt;, and &lt;a href="https://www.dailymotion.com/"&gt;Dailymotion&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Just like Mastodon, PeerTube is decentralized. Anyone can make their own PeerTube instance with its specific moderation policies and guidelines. These can then come together to form federations with other federations that agree on the same policies.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=PJIsiuSdpq8"&gt;https://www.youtube.com/watch?v=PJIsiuSdpq8&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can &lt;a href="https://github.com/Chocobozzz/PeerTube"&gt;download PeerTube here&lt;/a&gt; and read more about the platform in &lt;a href="https://www.256kilobytes.com/content/show/4952/what-is-peertube-introduction-to-the-free-and-open-source-video-platform"&gt;this article&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Commento (vs Disqus)
&lt;/h2&gt;

&lt;p&gt;Like &lt;a href="https://disqus.com/"&gt;Disqus&lt;/a&gt; and other commenting platforms, the open-source software &lt;a href="https://commento.io/"&gt;Commento&lt;/a&gt; can be embedded right into your blog or website for your readers to use and includes other standard features such as nesting threads, upvotes/downvotes, and moderation tools.&lt;/p&gt;

&lt;p&gt;Compared to similar platforms, Commento is absurdly fast and lightweight. It is also privacy-focused and &lt;a href="https://github.com/adtac/commento"&gt;can be downloaded and hosted&lt;/a&gt; for free. There is also a paid option if you want to use Commento but not host it yourself, but even this &lt;a href="https://commento.io/pricing"&gt;has very reasonable payment options&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Please refer to this article for more information about &lt;a href="https://www.256kilobytes.com/content/show/4957/what-is-commento-the-open-source-disqus-alternative"&gt;Commento&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Mattermost (vs Slack)
&lt;/h2&gt;

&lt;p&gt;If you’re worried about losing your old &lt;a href="https://slack.com/"&gt;Slack&lt;/a&gt; messages and don’t want to upgrade to the paid plan, &lt;a href="https://mattermost.com/"&gt;Mattermost&lt;/a&gt; is a nice alternative that offers all of the important team chat features you would ever need. It even allows you to import current Slack channels and archives, making the transition to Mattermost very seamless.&lt;/p&gt;

&lt;p&gt;Mattermost includes all of the major features that Slack does: private and public chat channels, the ability to nest threads, and more. Mattermost is very customizable and features good support for archived threads.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=FuDvrkrqRzg"&gt;https://www.youtube.com/watch?v=FuDvrkrqRzg&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/mattermost/mattermost-server"&gt;Here is a download link&lt;/a&gt; for Mattermost. As a couple of honorable mentions, other popular FOSS team chat applications include &lt;a href="https://rocket.chat/"&gt;Rocket.Chat&lt;/a&gt; and &lt;a href="https://riot.im/"&gt;Riot.im&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  osTicket (vs Zendesk Chat)
&lt;/h2&gt;

&lt;p&gt;There are many alternatives, both free and paid for, for the &lt;a href="https://dashboard.zopim.com/"&gt;Zendesk Chat&lt;/a&gt; (formerly known as Zopim) ticketing system software. One that stands out is &lt;a href="https://osticket.com/"&gt;osTicket&lt;/a&gt;, which is easy-to-use and lightweight while still providing all the features needed from a ticket system.&lt;/p&gt;

&lt;p&gt;osTicket is &lt;a href="https://github.com/osTicket/osTicket"&gt;completely free&lt;/a&gt; and can be configured to meet your needs. It provides statistics on your help-desk activity, the ability to customize help desk topics, and a ticket filtering system. The full features &lt;a href="https://osticket.com/features/"&gt;can be read about here&lt;/a&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  Is Self-Hosting Best for You?
&lt;/h1&gt;

&lt;p&gt;There are some potential drawbacks to self-hosting these platforms. For one, you’ll need dedicated hardware to host them and the time to maintain it. Additionally, some of these open source platforms must be configured and are not necessarily read to go right out of the box.  &lt;/p&gt;

&lt;p&gt;The upside of having to configure your own platforms, of course, is that they are much more customizable, and you can make them whatever you want them to be. They may be a bit more work to set up and maintain, but this can be well worth it for the budgetary benefits and increased independence.&lt;/p&gt;

&lt;h1&gt;
  
  
  Follow Up Article on 256KB
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;a href="https://www.256kilobytes.com/content/show/10548/7-more-open-source-alternatives-to-proprietary-software-desktop-applications"&gt;7 MORE Open-Source Alternatives to Proprietary Software: Desktop Applications&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>opensource</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
