I recently ran into a classic case of "our code is using way more memory than it should". So I took my first dive into memory profiling Rust code. I read several posts about this, including the following
;Iconify.scm | |
;=========================== | |
;Author...Giuseppe Bilotta | |
;Modified for Gimp 2.4.6+ by Ouch67 | |
;http://www.gimptalk.com/forum/broken-scripts-t33501.html | |
;Resubmission to Gimp Plugin Registry & GimpTalk by Gargy | |
;Modified for Gimp 2.8 by Roland Clobus | |
;------------ | |
;Description...: Iconify plug-in converts a single layer of a single image into a multi-layered image ready to be saved as a Windows icon. | |
;The new image will contain all standard sizes (16x16, 32x32, 48x48) at all standard bit depths (16 colors, 256 colors, 32-bit RGBA), with transparency support. |
default['sshd']['sshd_config']['AuthenticationMethods'] = 'publickey,keyboard-interactive:pam' | |
default['sshd']['sshd_config']['ChallengeResponseAuthentication'] = 'yes' | |
default['sshd']['sshd_config']['PasswordAuthentication'] = 'no' |
#!/usr/bin/env bash | |
# To fix the " gpg: WARNING: unsafe permissions on homedir '/home/path/to/user/.gnupg' " error | |
# Make sure that the .gnupg directory and its contents is accessibile by your user. | |
chown -R $(whoami) ~/.gnupg/ | |
# Also correct the permissions and access rights on the directory | |
chmod 600 ~/.gnupg/* | |
chmod 700 ~/.gnupg |
There are numerous reasons you may need to use multiple SSH keys for accessing GitHub and BitBucket
You may use the same computer for work and personal development and need to separate your work.
When acting as a consultant, it is common to have multiple GitHub and/or BitBucket accounts depending on which client you may be working for.
You may have different projects you're working on where you would like to segregate your access.
Moved to git repository: https://github.com/aliesbelik/load-testing-toolkit
Tools to benchmark & load-test your code or services
- apachebench (ab) - Standalone apachebench (ab), Apache HTTP server benchmarking tool.
C
- httperf - A tool for measuring web server performance.
C
I have an extremely useful alias that I use extensively in my git workflow:
alias gfixup="git commit --fixup HEAD && EDITOR=cat git rebase -i --autosquash HEAD~2 | sed '/^#/ d'"
Commits changes in the git index and auto-squashes the commit into the previous commit without opening $EDITOR!
- git add .
/// Problem: there is a lot of duplication in function implementations. | |
/// The two types should have the same interface but use a different underlying type. | |
/// | |
/// How can I reduce the amount of duplication and avoid having to update the code in two places? | |
/// In other languages, I would define a base class which accepts a generic type for the `SoundSource`s | |
/// but I don't know how to solve this sort of problem in Rust. | |
struct Sound { | |
// Shared properties | |
is_playing: bool, |
/// Problem: there is a lot of duplication in function implementations. | |
/// The two types should have the same interface but use a different underlying type. | |
/// | |
/// How can I reduce the amount of duplication and avoid having to update the code in two places? | |
/// In other languages, I would define a base class which accepts a generic type for the `SoundSource`s | |
/// but I don't know how to solve this sort of problem in Rust. | |
struct Sound { | |
// Shared properties | |
is_playing: bool, |
# WEB | |
WEB is a recursive acronym. WEB stands for WEB Editor Bookmarklet. | |
WEB is a minimalistic HTML, CSS, and JavaScript CodePen-like web editor that fits inside a bookmarklet. | |
# Usage | |
Every time you edit the HTML, CSS, and JavaScript in the top three boxes, the result gets evaluated. | |
# Sharing | |
Click the share button in the bottom right to copy the contents of your WEB onto the clipboard for sharing. |