Skip to content

Instantly share code, notes, and snippets.

@rdesfo
rdesfo / project.org
Last active April 2, 2023 20:12
R plot in orgmode

Before executing

Is it possible to anchor the results output under the cpation and name or get orgmode to regenerate the caption with the ouptut? I’ve attempted to adding a :post <another source block name> with a drawer but I couldn’t get it printout in a way that would easily export.

hist(project_df$column, col="red", main="Plot title")
@rdesfo
rdesfo / pdf2jpg.rb
Created March 17, 2012 17:22
ruby and Imagemagick convert pdf to high res jpg
#!/usr/bin/env ruby
files = Dir.glob("*.pdf")
files.each do |f|
# puts f.sub(/.pdf/, '')
IO.popen("convert -scale 2000x1000 #{f} #{f}.jpg")
end
@rdesfo
rdesfo / test.html
Created April 18, 2017 17:02
h-entry test
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Desfo.org - Enabling Docker's User Namespaces in Nixos</title>
<link rel="stylesheet" type="text/css" href="../css/default.css" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
@rdesfo
rdesfo / default.nix
Last active January 19, 2017 23:37
pkgs/tools/backup/deja_dup/default.nix
{ stdenv, fetchurl, cmake, pkgconfig, curl }:
stdenv.mkDerivation rec {
name = "deja_dup";
version = "34.3";
src = fetchurl {
url = "https://launchpad.net/deja-dup/34/${version}/+download/deja-dup-${version}.tar.xz";
sha256 = "1xqcr61hpbahbla7gdjn4ngjfz7w6f57y7f5pkb77yk05f60j2n9";
};
@rdesfo
rdesfo / bath_tripadvisor.py
Created May 5, 2016 15:03
scrapy bath restaurants
import scrapy
class TripadvisorSpider(scrapy.Spider):
name = 'tripadvisor'
allow_domains = ['tripadvisor.com']
start_urls = [
'http://www.tripadvisor.com/Restaurants-g40505-Bath_Maine.html'
]
custom_settings = {
'FEED_EXPORT_FIELDS': ["name", "rating", "latitude", "longitude", "url"]
@rdesfo
rdesfo / index.html
Last active July 16, 2016 17:22
quoteChallenge
<div class="container">
<div class="row text-center">
<h2><i class="fa fa-rocket" aria-hidden="true"></i> Futurama Quote Machine</h2>
</div>
<div class="row text-center">
<div class="col-xs-12 well well-lg message">
The message will go here
</div>
</div>
<div class="row text-center">

Tribute Page

This is my tribute page for freecodecamp. It's currently unfinished, but should be down soon. :)

A Pen by Ryan on CodePen.

License.

@rdesfo
rdesfo / gist:8506428
Last active January 3, 2016 19:09
grub2 nixOS
menuentry "NixOS 13.10.35511.dd717f2 Installer" {
set root='(hd0,msdos1)'
linux /boot/nixos-livecd-bzImage init=/nix/store/fciz0cbs38vd7z7g0rwvzdnjmkbflb9b-nixos-13.10.35511.dd717f2/init root=/dev/sda1 loglevel=4
initrd /boot/nixos-livecd-initrd
}
@rdesfo
rdesfo / krunner.desktop
Created August 7, 2013 07:46
disable krunner ~/.kde4/share/autostart/krunner.desktop
[Desktop Entry]
Exec=krunner
Hidden=true
X-DBUS-StartupType=none
Name=Command Runner
Type=Service
X-KDE-StartupNotify=false
OnlyShowIn=KDE;
X-KDE-autostart-phase=1
@rdesfo
rdesfo / Disable_Nepomuk_n_Akonadi.md
Created August 6, 2013 23:45
Disable Nepomuk & Akonadi

Nepomuk

Open ~/.kde/share/config/nepomukserverrc and set “Start Nepomuk” to false.

[Basic Settings]
Start Nepomuk=false

Open ~/.kde/share/config/kdedrc and set “autoload” to false for nepomuksearchmodule:

[Module-nepomuksearchmodule]