|
As some point I had to generate a random MAC address. This is the snippet I used: import random def randomMAC(): mac = [0x00, 0x16, 0x3e, random.randint(0x00, 0x7f), random.randint(0x00, 0xff), random.randint(0x00, 0xff), ] return ':'.join(map(lambda x: "%02x" % x, mac)) print 'MAC => %s' % randomMAC() MAC => 00:16:3e:7e:f7:fa
|
|
I'm often asked by other developers about parts of the pixel workflow, and what fires when and why, so I figured it might be worth putting up a little reference for what's involved in shipping pixels to screen.
|
In the GOF book, the interpreter pattern is probably one of the most poorly described patterns. The interpreter pattern basically consists…
|
|
I'm often asked by other developers about parts of the pixel workflow, and what fires when and why, so I figured it might be worth putting up a little reference for what's involved in shipping pixels to screen.
|
|
Absolute vividness and beautiful prose allowing the reader to be fully immersed in the forgotten history of both the Vietnam War…
|
|
You can use "M-x apropos-variable " to get documentation for variables matching a pattern. For more flexibility, some elisp can help with getting a list of all variables matching a regexp: (defun ar/variables-matching-pattern (pattern) "Get a list of all variables matching PATTERN." (let ((matched-variables '())) (mapatoms (lambda (symbol) ;; Symbol is variable? (when (and (boundp symbol) (string-match pattern (symbol-name symbol))....
|
|
Take a function \(f\) that maps from some bit string of length \(N\) to another bit string also of length \(N\). Suppose that this function is a 'hash function' with some properties we want: 1) Given an output value, it takes on average \(2^{N-1}\) evaluations of different inputs passed to \(f\) before we get the given output value. Note that if we try all \(2^N\) different inputs, we will definitely find the input that gives the outpu....
|
|
Based on Linting Prose in Emacs … Needs proselint installed: pip install proselint Also needs a flycheck checker defined: (flycheck-define-checker proselint "A linter for prose." :command ("proselint" source-inplace) :error-patterns ((warning line-start (file-name) ":" line ":" column ": " (id (one-or-more (not (any " ")))) (message) line-end)) :modes (gfm-mode markdown-mode org-mode text-mode)) (add-to-list 'flycheck-check..
|
|
Es saß auf der Poolwand eine Eidechse, die hatte ihren Schwanz unter Wasser. Sie bewegte sich nicht, nur das Wasser schwappte auf und ab und es schien, als würde sie mit dem Schwanz wedeln. Ich habe das gefilmt, zwanzig Minuten lang, wie die Eidechse ihren Schwanz bewegt, also nicht die Eidechse und nicht den Schwanz, aber es sah ja so aus. Ich habe das gefilmt, und die Speicherkarte in die Hosentasche getan, weil sie voll war, die Speich..
|
|
I know, I know, I don’t write as often as I used to. I have an excuse or two for this week though, I swear. Between helping a friend move, drinking some Puzzled Pints , volunteering with Destination Imagination , trying out (and struggling with) yoga and swing dancing (not at the same time), celebrating the Chinese New Year , and biking 50 miles to watch the Super Bowl with friends, I’ve been a reasonably busy bus bum. I also have ..
|
|
I know, I know, I don’t write as often as I used to. I have an excuse or two for this week though, I swear. Between helping a friend move, drinking some Puzzled Pints , volunteering with Destination Imagination , trying out (and struggling with) yoga and swing dancing (not at the same time), celebrating the Chinese New Year , and biking 50 miles to watch the Super Bowl with friends, I’ve been a reasonably busy bus bum. I also have ..
|
|
The Future of Web Development (Part 2): Full-Stack Automated JavaScript Testing
-
engineering.widen.com
-
10 years ago
-
eng
In my last article, I showed you how to develop a full-stack JavaScript web application using some pretty interesting and futuristic libraries and web specifications. In this follow-up, I'm going to demonstrate how you can write server-side and client-side unit and integration/Selenium tests for that app entirely in JavaScript.
|
|
When this post gained much traction in HackerNews and r/golang, I was both suprised and happy. The general interest made me more motivated to do more and write more. And also some good discussions happend on HackerNews thread that was & will be helpful to me. I decided to package myinit in Go, and rename it to gonit Contributions and ideas are welcome through email and in the issues of the GitHub repo.
|
|
Er det noen som sammenligner omfang og kostnad på IT prosjekter i Norge? Jeg tror man kunne få noen interessante innsikter dersom man gjorde dette riktig. (Jeg må unnskylde at teksten i denne blogposten blir litt vag - jeg ønsker å si så lite som mulig om de aktuelle prosjektene for å unngå å eksponere andre) Akkurat når jeg var involvert i et tilbudsarbeid for et prosjekt, var jeg samtidig involert i den endelige godkjenningen av et annet ..
|
|
From Generate go struct definition from json file , and before I forget: curl http://url.tld/file.json | gojson -name=Repository
|
|
I previously noted how to undo your last git commit (ie. soft reset) . Using Magit: M-x magit-log-current . Move point to prior revision. M-x magit-reset-soft (defaults to revision at point). Or if you want a single function: (require 'magit) (defun ar/magit-soft-reset-head~1 () "Soft reset current git repo to HEAD~1." (interactive) (magit-reset-soft "HEAD~1"))
|
|
CSS Filters are awesome, but you can't do individual channel manipulation with them. Enter: feColorMatrix, SVG filter effect method that allows for really in-depth pixel value manipulation for even better image filters.
|
|
Sending emails to our half million and growing user community
-
engineering.hackerearth.com
-
10 years ago
-
eng
At hackerearth we send emails to keep our users updated on upcoming challenges and their activities, for example, when a user successfully solves a problem, receives test-invitation, updates on user comments. Basically whenever it is appropriate. Architecture It takes lot of computational power to send emails in such large quantities synchronously. So we have implemented an asynchronous architecture to send emails. Here is brief overvie....
|
|
Die Flut kommt und bringt Sachen mit. Die Ebbe kommt, und zeigt sie. Manchmal kommen ältere Spieler und tragen den Müll zur Seite. Danach kommt wieder die Flut. Das ist der Lauf der Dinge.
|
|
So you’re a roboticist, looking at Ubuntu Core and Snappy, trying to decide if they’re a good fit for your project. You come across some ROS documentation and realize that the ROS support is first-class, but you’re not using ROS. No, you’re using the Mission Oriented Operating Suite (MOOS). Why is there no documentation on using MOOS? Because it’s too easy to need a document, that’s why (update: this remains true, but we wrote a quick one a..
|
Full transcript of a speech to ASMS high school students about pursuing your passions, building networks and doing your own thing
|
Full transcript of a speech to ASMS high school students about pursuing your passions, building networks and doing your own thing
|
Full transcript of a speech to ASMS high school students about pursuing your passions, building networks and doing your own thing
|
|
Ребенок ищет сиську, а её уж нет. Как мы сегодня, пришли, поснимали кино, пообещали на следущий день фотографии принести, а дома оказалось, что у мелкого фотопринтера, который специально с собой взяли нет чернил и бумаги. Рррржжжррррррррр…
|
|
I am working on myinit.go. Init process is no good if it cannot spawn other processes. I will use the other processes for critical functionality, i.e getting an IP address for future interactivity over SSH or maybe HTTP, or possibly Web Sockets. Because, why not? Anyways, I modified myinit.go to following and put it in the /init folder to have a nicer structure. It basically spawns a new process, and prints it output.
|
|
Сегодня весь день провалялись дома. Я залечивал обгоревшую спину и ноги, а Кристоф отсыпался - он всю ночь смотрел Супербоул на телефоне. Да и просто после недели постоянной подготовки и работы, приятно ничего не делать. Как в детстве бывали такие летние дни - да что там - всё лето бывало, в безвременье. Встал, поел, что-то почитал, что-то написал, искупался в бассейне.. И вроде всё есть, но нет той обязательности, необходимости оптимиз..
|
|
Data is abundant, data is big, and big is a problem. Let me start with an example. Let’s say you have a list of movie titles and you want to learn their genre: romance, action, drama, etc. And maybe in this scenario IMDB doesn’t exist so you can’t scrape the answer. Well, the title alone is almost never enough information. One nice way to get more data is to do the following:
|
|
Data is abundant, data is big, and big is a problem. Let me start with an example. Let’s say you have a list of movie titles and you want to learn their genre: romance, action, drama, etc. And maybe in this scenario IMDB doesn’t exist so you can’t scrape the answer. Well, the title alone is almost never enough information. One nice way to get more data is to do the following:
|
|
Data is abundant, data is big, and big is a problem. Let me start with an example. Let’s say you have a list of movie titles and you want to learn their genre: romance, action, drama, etc. And maybe in this scenario IMDB doesn’t exist so you can’t scrape the answer. Well, the title alone is almost never enough information. One nice way to get more data is to do the following:
|