Skip to content

Instantly share code, notes, and snippets.

@KodrAus
KodrAus / Profile Rust on Linux.md
Last active November 14, 2023 17:19
Profiling Rust Applications

Profiling performance

Using perf:

$ perf record -g binary
$ perf script | stackcollapse-perf.pl | rust-unmangle | flamegraph.pl > flame.svg

NOTE: See @GabrielMajeri's comments below about the -g option.

@xrl
xrl / heka_build.chef.rb
Last active August 29, 2015 14:22
How I build a heka deb with my custom plugin
user = "xavierlange"
heka_dir = "#{Chef::Config[:file_cache_path]}/heka"
%w(cmake mercurial fakeroot debhelper libgeoip-dev).each do |pkg|
package pkg
end
directory heka_dir do
owner user
group user
@cmtoomey
cmtoomey / Tableau.xml
Last active December 28, 2023 21:46
Fully Documented Tableau Workbook as XML
<?xml version='1.0' encoding='utf-8' ?>
<!--This is the basics - platform (windows or mac)and version number-->
<workbook source-platform='mac' version='9.0' xmlns:user='http://www.tableausoftware.com/xml/user'>
<!-- build 9000.15.0318.1720 -->
<!--No idea what this for -->
<preferences>
<preference name='ui.encoding.shelf.height' value='250' />
<preference name='ui.shelf.height' value='250' />
</preferences>
<!--This is everything you need to know about datasources -->
@brian-mann
brian-mann / FadeTransitionRegion.js
Created October 24, 2012 16:28
Allows jQuery animation transitions between marionette regions
var FadeTransitionRegion = Backbone.Marionette.Region.extend({
show: function(view){
this.ensureEl();
view.render();
this.close(function() {
if (this.currentView && this.currentView !== view) { return; }
this.currentView = view;
@thwarted
thwarted / sshpub-to-rsa
Created June 14, 2011 09:12
converts an openssh RSA public key into a format usable by openssl rsautl (if you don't have openssh 5.6 or later with ssh-keygen PEM export format)
#!/usr/bin/env python
# with help and inspiration from
# * ASN1_generate_nconf(3) (specifically the SubjectPublicKeyInfo structure)
# * http://www.sysmic.org/dotclear/index.php?post/2010/03/24/Convert-keys-betweens-GnuPG%2C-OpenSsh-and-OpenSSL
# * http://blog.oddbit.com/2011/05/converting-openssh-public-keys.html
import sys
import base64
import struct