Skip to content

Instantly share code, notes, and snippets.

View deborasetton's full-sized avatar

Débora Setton deborasetton

View GitHub Profile
/**
* Exemplo de paralelismo heterogêneo com microtarefas.
*/
#include <stdio.h>
#include <unistd.h>
task spec task1();
task body task1() {
printf("Running task1\n");
@deborasetton
deborasetton / findsym.py
Created September 6, 2015 22:18
Python script to search for a symbol in libraries loaded by the dynamic linker (ld.so)
#!/usr/bin/env python
# Python script to search for a given symbol in libraries that are loaded by
# the dynamic linker (ld.so) in Linux.
#
# For example: to use the function `cabs` (absolute value of a complex number)
# you need to include the header <complex.h>, but the function itself is
# defined in libm.so.
#
# To find that out, you'd run:
@deborasetton
deborasetton / vm-setup.sh
Last active August 29, 2015 14:16
Virtual Machine configuration
# Ubuntu 14.04
# Install Guest Additions
# Install updates
# Update system
sudo apt-get update
sudo apt-get upgrade
# Xfce
@deborasetton
deborasetton / leak.rb
Last active August 29, 2015 14:12
Test case for Sidekiq issue #2107
# Minimal example that demonstrates a memory leak in Sidekiq (or Celluloid?).
# Adapted from @grosser example: https://github.com/mperham/sidekiq/blob/master/examples/leak.rb
# Run with LEAK=0 for no memory leak or LEAK=1 for memory leak, like so:
# LEAK=1 sidekiq -r ./leak.rb > /dev/null
require 'sidekiq'
redis = { namespace: :leak }
@deborasetton
deborasetton / Stuff to refer to later
Last active August 29, 2015 14:10
Stuff to refer to later
// Gist with some stuff to refer to later.
@deborasetton
deborasetton / index.html
Last active August 29, 2015 14:10
Demo for AngularJS-Toaster issue with scopes
<!DOCTYPE html>
<html ng-app='DemoApp'>
<head>
<title></title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.0/angular.min.js" ></script>
<script src="http://code.angularjs.org/1.2.0/angular-animate.min.js" ></script>
<script type="text/javascript" src='toaster.js'></script>
<link rel="stylesheet" href="toaster.css"></link>
<script type="text/javascript">
@deborasetton
deborasetton / 0_README.md
Last active August 29, 2015 14:10
Test case for Feedjira issue #253
bundle install
bundle exec ruby feedjira_test.rb
bundle exec ruby monkeypatched_feedjira_test.rb
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>Solarized (dark)</string>
<key>settings</key>
<array>
<dict>
<key>settings</key>
@deborasetton
deborasetton / examples.js
Created October 9, 2014 10:07
Examples from "Become a Javascript Console Power-User"
// Source: https://www.youtube.com/watch?v=4mf_yNLlgic
// https://www.youtube.com/watch?v=4mf_yNLlgic#t=75
console.time('ajax');
// Do something!
console.timeEnd('ajax');
// https://www.youtube.com/watch?v=4mf_yNLlgic#t=111
console.log(element);
console.dir(element); // or dir(), if in console.