This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"nodes": { | |
"flake-utils": { | |
"inputs": { | |
"systems": "systems" | |
}, | |
"locked": { | |
"lastModified": 1694529238, | |
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", | |
"owner": "numtide", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fs = require('fs'); | |
var request = require('request'); | |
var joinUrl = require('url').resolve; | |
if (process.argv.length != 3) { | |
console.log("Please pass playlist URL"); | |
process.exit(1); | |
} | |
var plsUrl = process.argv[2]; | |
var INTERVAL = 5 * 1000; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PORT=/dev/ttyACM1 | |
HEX=hollow_v0.31.hex | |
ard-reset-arduino --caterina $PORT --verbose | |
avrdude -P /dev/ttyACM1 -p atmega32u4 -c avr109 -b 57600 -D -Uflash:w:$HEX:i |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE OverloadedStrings, RankNTypes #-} | |
module Main where | |
import Data.Conduit | |
import Data.Conduit.Binary | |
import qualified Data.Conduit.List as CL | |
import Data.XML.Types | |
import Text.XML.Stream.Parse | |
import System.IO | |
import qualified Data.Text as T |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE OverloadedStrings #-} | |
module Main where | |
import Control.Monad | |
import System.IO | |
import System.ZMQ3.Monadic | |
import qualified Data.ByteString.Char8 as CS | |
import Control.Concurrent (forkIO) | |
main :: IO () |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var http = require('http'); | |
var child_process = require('child_process'); | |
function poll(url, cb) { | |
http.get(url, function(res) { | |
var body = ""; | |
res.setEncoding('utf8'); | |
res.on('data', function(data) { | |
body += data; | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- twobit.hs.orig 2012-07-05 00:24:21.399187088 +0200 | |
+++ twobit.hs 2012-07-05 00:38:06.288433147 +0200 | |
@@ -1,3 +1,4 @@ | |
+{-# LANGUAGE OverloadedStrings #-} | |
import System.IO | |
import Data.Char | |
import System.Environment | |
@@ -9,7 +10,7 @@ | |
deriving (Show) | |
data V = Fun (V -> V) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
prittorrent=> explain analyze select * from feed_items inner join enclosures on (feed_items.feed=enclosures.feed AND feed_items.id=enclosures.item) inner join enclosure_torrents using (url) order by feed_items.published desc limit 17; | |
QUERY PLAN | |
--------------------------------------------------------------------------------------------------------------------------------------------------------------------- | |
Limit (cost=0.00..465.69 rows=17 width=1049) (actual time=0.043..0.597 rows=17 loops=1) | |
-> Nested Loop (cost=0.00..1807.98 rows=66 width=1049) (actual time=0.043..0.593 rows=17 loops=1) | |
-> Nested Loop (cost=0.00..1782.72 rows=66 width=1020) (actual time=0.025..0.379 rows=17 loops=1) | |
-> Index Scan Backward using feed_items_published on feed_items (cost=0.00..1035.62 rows=1560 width=873) (actual time=0.004..0.016 rows=17 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From slide 22 of http://www.fischmarkt.de/2010/05/very_high_performance_websites_the_next.html Many of these can be checked with the YSlow Firebug extension. | |
* Make fewer HTTP requests | |
* Use a Content Delivery Network (CDN) | |
* Add Expires headers | |
* Compress components with gzip | |
* Put CSS at top | |
* Put JavaScript at bottom | |
* Avoid CSS expressions | |
* Make JavaScript and CSS external |
NewerOlder