サクサク読めて、アプリ限定の機能も多数!
トップへ戻る
Switch 2
catonmat.net
This is an alphabetical list of vim plugins that I use. Alternate In C or C++ projects, source and header files often come in pairs. For example, there's utils.c and utils.h and you often need to edit both files at the same time. With Alternate, you can type the :A command and it will quickly switch between .c and .h files. If you're in a .c file, it will switch to the .h file, and if you're in a
I love to cook with curl. Here are some useful curl recipes I often use. Make a POST Request (TLDR: Use -X POST argument) Add POST Data to a Request (TLDR: Use -d var=val argument) Construct a Query String (TLDR: Use -G argument) Add HTTP Headers (TLDR: Use -H 'Header: Value' argument) Change the User Agent (TLDR: Use -A 'User Agent' argument) Set Cookies (TLDR: Use -b name=value argument) Add a R
Remember my article on why vi uses hjkl keys? It got very popular so I thought I'd also do an article about Emacs. When Stallman and Steele created Emacs, they both worked at MIT's AI lab. The systems they worked on had these funny keyboards with a bunch of extra keys called Hyper, Super, Meta and Control. Meta was closer to the pinky finger so that's why it was adopted by Emacs. Hyper and Super n
Hi everyone! Here's part five of my favorite programming, computer and science books. If you're just joining, please see part one, part two, part three and part four. I've been collecting and researching science, math, physics, programming books since 2001 or 2002, so it's been close to 15 years of book research. I'm really passionate about high quality books. For every high quality book there are
Hi everyone! Here's part four of my favorite programming, computer, and science books. If you're just joining, please see part one, part two and part three for introduction. This time I'm sharing my favorite books about fundamentals of computation, mathematical foundations of cryptography, type-directed functional programming, low level bit hacks, and visual thinking. I love reading. The most fun
Welcome to part two of my favorite programming, computer, and science books. If you're just joining, please see part one for introduction. In this part I'll cover a mix of my favorite theoretical and practical books because as Donald Knuth says in his Selected Papers on Computer Science, "The best theory is inspired by practice; The best practice is inspired by theory." I'm a huge fan both of theo
Imagine a world where every line of code tells a story, and each algorithm unfolds like an intricate puzzle – this is where my love for books on programming, coding, and development comes alive. Recently, Fog Creek sparked a delightful conversation by asking me about my favorite books in these fields. As a self-confessed book nerd with an insatiable appetite for literature on computers, programmin
A couple of days ago I watched a How Computers Learn talk by Peter Norvig. In this talk, Peter talked about how Google did machine learning and at one point he mentioned that at Google they also applied machine learning to hiring. He said that one thing that was surprising to him was that being a winner at programming contests was a negative factor for performing well on the job. Peter added that
This is the introduction to perl one-liners. Originally I wrote this introduction for my third e-book, however later I decided to make it a part of the free e-book preview and republish it here as this article. Perl one-liners are small and awesome Perl programs that fit in a single line of code and they do one thing really well. These things include changing line spacing, numbering lines, doing c
Today is 4 years since I and my co-founder James Halliday have been working at Browserling Inc. I thought I'd share what I think are the top 10 inventions at our company. The first two choices are obvious. They're our products Browserling and Testling. The next eight choices are useful and popular open source projects - browserify, dnode, ploy, seaport, airport and upnode, bouncy, hyperglue and hy
Here's another interesting story about how we do things at Browserling. This time the story is about how we use ploy to deploy code at Browserling and Testling. First off, what is ploy? Ploy is a deployment system that we created at Browserling, that includes a http router, a git endpoint and a process manager all in one. You just push your code at ploy, and it deploys it and runs the necessary pr
Did you know you could traceroute over the TCP protocol? The regular traceroute usually uses either ICMP or UDP protocols. Unfortunately, firewalls and routers often block the ICMP protocol completely or disallow the ICMP echo requests (ping requests), and/or block various UDP ports. However, you'd rarely have firewalls and routers drop TCP protocol on port 80 because it's the web port. Check this
Writing testling-ci tests is super easy. The only thing your test runner needs to do is to produce TAP output on console.log or process.stdout. Let's create a new node module called testling-ci-test-example and let's add cross-browser tests to it. Once the tests run, you get a badge like this that shows in which browsers your code works: First, let's create index.js that exports a few functions, s
We at Browserling are proud to announce Testling-CI! Testling-CI lets you write continuous integration cross-browser tests that run on every git push! There are a ton of modules on npm and github that aren't just for node.js but for browsers, too. However, figuring out which browsers these modules work with can be tricky. It's often that case that some module used to work in browsers but has accid
I was solving a problem for Testling and run into difficulties. Every Github user who signs up for Testling gets a Unix user on Testling's servers. When they commit code, we get a Github hook, switch to their user, clone their repo, and run their tests. To quickly get it running, I copied / to /chroot and then when the hook comes, I just chroot to this environment, then su - username, and then run
This is the second part of the Bash One-Liners Explained article series. In this part I'll show you how to do various string manipulations with bash. I'll use only the best bash practices, various bash idioms and tricks. I want to illustrate how to get various tasks done with just bash built-in commands and bash programming language constructs. See the first part of the series for introduction. Af
This is the fifth part of the Bash One-Liners Explained article series. In this part I'll teach you how to quickly navigate around the command line in bash using emacs-style keyboard shortcuts. That's right, emacs-style keyboard shortcuts. It might surprise you but by default bash uses emacs-style keyboard shortcuts for navigating around the command line. Keep reading to learn more! See the first
I thought I'd share my favorite regex of all time. [ -~] Any idea what this regexp matches? Scroll down for the answer. . . . . . . . . It matches all ASCII characters from the space to tilde. What are these characters? These are all printable characters! Take a look at this ASCII table. Printable characters start at the space and end at tilde (in light blue background). Non-printable characters a
This is the third part of the Bash One-Liners Explained article series. In this part I'll teach you all about input/output redirection. I'll use only the best bash practices, various bash idioms and tricks. I want to illustrate how to get various tasks done with just bash built-in commands and bash programming language constructs. See the first part of the series for introduction. After I'm done w
Bash Redirections Cheat Sheet Redirection Description cmd > file Redirect the standard output (stdout) of cmd to a file. cmd 1> file Same as cmd > file. 1 is the default file descriptor (fd) for stdout. cmd 2> file Redirect the standard error (stderr) of cmd to a file. 2 is the default fd for stderr. cmd >> file Append stdout of cmd to a file. cmd 2>> file Append stderr of cmd to a file. cmd &> fi
Hey guys! A few weeks ago I wrote an article called All About Bash Redirections. It explains all the possible bash redirections with illustrations. I thought it would be a great idea to make a cheat sheet that summarizes all these redirections. So I did. Here is the bash redirections cheat sheet: If you want to learn how each one of these redirections work, read my article All About Bash Redirecti
A few days ago I made the GNU Coreutils Cheat Sheet. It had over 15,000 downloads in the first day and a lot of people suggested that I create more cheat sheets. So I did! I just created util-linux cheat sheet. Most of the utilities from util-linux are available on all Linux systems, so this cheat sheet provides a great overview of what you can do in Linux. Here is the util-linux cheat sheet that
A long, long time ago when I was mastering Linux I created three cheat sheets about GNU fileutils, GNU shellutils and GNU textutils. I kept keep them in front of me at all times and I quickly memorized which commands did what. A few days ago I remembered about them and decided to publish them on my blog but it turned out fileutils, shellutils and textutils had been merged in GNU coreutils in 2003;
I just had this quick idea to write a tcp port scanner in bash. Bash supports a special /dev/tcp/host/port file that you can read/write. Writing to this special file makes bash open a tcp connection to host:port. If writing to the port succeeds, the port is open, else the port is closed. At first I wrote this quick script. for port in {1..65535}; do echo >/dev/tcp/google.com/$port && echo "port $p
I love being super fast in the shell so I decided to do a new article series called Bash One-Liners Explained. It's going to be similar to my other article series - Awk One-Liners Explained, Sed One-Liners Explained, and Perl One-Liners Explained. After I'm done with this bash series, I'll release an e-book by the same title, just as I did with awk, sed, and perl series. The e-book will be availab
Many people are surprised to learn that sed, a seemingly simple text filtering program, is actually Turing complete. This realization prompts the question: how can a text processing utility achieve such computational power? The answer lies in sed's fundamental operations. Essentially, sed functions as a miniature assembly language, equipped with a comparison operation, branching capabilities, and
I was reading about vim the other day and found out why it used hjkl keys as arrow keys. When Bill Joy created the vi text editor he used the ADM-3A terminal, which had the arrows on hjkl keys. Naturally he reused the same keys and the rest is history. Here is how the hjkl keys looked.
Hello everyone! I'm happy to announce my 3rd e-book called Perl One-Liners Explained. This book is based on the Perl One-Liners Explained article series that I wrote over the last 3 years and that has been read over 1,000,000 times! I went through all the one-liners in the article series, improved explanations, fixed mistakes and typos, added a bunch of new one-liners, added an introduction to Per
Hello everyone! This is the 14th post in the node.js modules you should know about article series. The first post was about dnode - the freestyle rpc library for node, the second was about optimist - the lightweight options parser for node, the third was about lazy - lazy lists for node, the fourth was about request - the swiss army knife of HTTP streaming, the fifth was about hashish - hash combi
次のページ
このページを最初にブックマークしてみませんか?
『catonmat.net』の新着エントリーを見る
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く