Skip to content

Instantly share code, notes, and snippets.

@pulsation
pulsation / nixpkgs-review pr 102669.txt
Last active November 4, 2020 19:25
nixpkgs-review pr 102669 as root
# ~phil/src/nixpkgs-review/result/bin/nixpkgs-review pr 102669
$ git -c fetch.prune=false fetch --force https://github.com/NixOS/nixpkgs master:refs/nixpkgs-review/0 pull/102669/head:refs/nixpkgs-review/1
remote: Enumerating objects: 12, done.
remote: Counting objects: 100% (12/12), done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 13 (delta 8), reused 12 (delta 8), pack-reused 1
Dépaquetage des objets: 100% (13/13), 1.69 Kio | 46.00 Kio/s, fait.
Depuis https://github.com/NixOS/nixpkgs
* [nouvelle branche] master -> refs/nixpkgs-review/0
* [nouvelle référence] refs/pull/102669/head -> refs/nixpkgs-review/1
@pulsation
pulsation / gist:342addfd7b9a849a99dfcb5c03978eb9
Created November 4, 2020 14:58
nixpkgs-review pr 102669 execution result
➜ nixpkgs-review pr 102669
$ git -c fetch.prune=false fetch --force https://github.com/NixOS/nixpkgs master:refs/nixpkgs-review/0 pull/102669/head:refs/nixpkgs-review/1
$ git worktree add /home/phil/.cache/nixpkgs-review/pr-102669-1/nixpkgs 0d3256564447e8cca0b0df4400790abff73c5401
Préparation de l'arbre de travail (HEAD détachée 0d325656444)
Mise à jour des fichiers: 100% (23093/23093), fait.
HEAD est maintenant à 0d325656444 libical: disable rest of failing tests
$ git merge --no-commit a9085c1b4f38e6b334853d87d6beb815c1087890
Fusion automatique de pkgs/top-level/all-packages.nix
La fusion automatique a réussi ; stoppée avant la validation comme demandé
$ nix build --no-link --keep-going --option build-use-sandbox relaxed -f /home/phil/.cache/nixpkgs-review/pr-102669-1/build.nix

Keybase proof

I hereby claim: * I am pulsation on github. * I am pulsation (https://keybase.io/pulsation) on keybase. * I have a public key ASB7h5_tSmXYXTtO3zKdiVeZ2Wg5kfOKhwZ2IufMAK8vgwo To claim this, I am signing this object:

{   "body": {     "key": {       "eldest_kid": "01207b879fed4a65d85d3b4edf329d895799d9683991f38a87067622e7cc00af2f830a",       "host": "keybase.io",       "kid": "01207b879fed4a65d85d3b4edf329d895799d9683991f38a87067622e7cc00af2f830a",       "uid": "3a079d7e17eb61cd2eddbefe8a46f219",       "username": "pulsation"     },     "merkle_root": {       "ctime": 1565805634,       "hash": "fe188eb21153f07221fa5ab59ea3ced3be204a8add143ab0430fa68f72eacb64d9f1a7cf0f195ac7cab6152138bc83b5fabd5d9d91bbd0d4fb9cff965e0ab3d5",       "hash_meta": "697c53dd5477e7556b5a4444766d691bd11a09c19040b53dce75c8a18570effe",       "seqno": 6016018     },     "service": {       "entropy": "jOrxAxWVMpeoM6x1hUrmzuWx",       "name": "github",       "username": "pulsation"     },     "type": "web_
@pulsation
pulsation / spark2-addfile-test.scala
Created May 14, 2019 12:31
addFile test in spark2 shell
import org.apache.spark.SparkFiles
import org.apache.spark.SparkContext
val context = spark.sparkContext
val fileName = "file.csv"
val fetchedFile = context.addFile(s"ftp://my-ftp-server.net/$fileName")
val readFile = context.textFile(SparkFiles.get(fileName)).collect()
readFile.foreach(println)
@pulsation
pulsation / extend.sh
Last active May 26, 2019 00:10 — forked from wvengen/extend.sh
Extend non-HiDPI external display above HiDPI internal display
#!/bin/sh
# extend non-HiDPI external display on DP* above HiDPI internal display eDP*
# see also https://wiki.archlinux.org/index.php/HiDPI
# you may run into https://bugs.freedesktop.org/show_bug.cgi?id=39949
# https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/883319
EXT=`xrandr --current | sed 's/^\(.*\) connected.*$/\1/p;d' | grep -v ^eDP | head -n 1`
INT=`xrandr --current | sed 's/^\(.*\) connected.*$/\1/p;d' | grep -v ^DP | head -n 1`
ext_w=`xrandr | sed 's/^'"${EXT}"' [^0-9]* \([0-9]\+\)x.*$/\1/p;d'`
class App {
public static class SuperClass {}
public static class SubClass extends SuperClass {}
public static <T, U extends T> U returnSub(T sup, U sub) {
return sub;
}
public static void main(String[] args) {
SuperClass parent = new SuperClass();
@pulsation
pulsation / wssetoken.php
Last active August 29, 2015 14:10 — forked from borisguery/wssetoken.php
Test WSSE token
#!/usr/bin/env php
<?php
function wsse_header($username, $password) {
$nonce = hash_hmac('sha512', uniqid(null, true), uniqid(), true);
$created = new DateTime('now', new DateTimezone('UTC'));
$created = $created->format(DateTime::ISO8601);
$digest = sha1($nonce.$created.$password, true);
return sprintf(

Tic Tac Toe !

To play Tic Tac Toe ! with Cypher queries.

wargames
@pulsation
pulsation / rss_dc.scala
Created September 20, 2013 13:13
Use scala.xml._ to parse atom rss according to dublin core namespaces
package rss
import scala.xml._
class Feed(val url: String) {
def downloadItems(): List[Item] = {
val root = XML.load(url)
(root \\ "item").map(buildItem(_)).toList
}
def buildItem(node: Node): Item = {
@pulsation
pulsation / hash_accu.scala
Last active December 22, 2015 20:08
Accumulate hash values using Scala
val myHashList = List("at work" -> 7, "at home" -> 5, "at david's" -> 3)
val myNewValue = "at home" -> 1
myHashList :+ myNewValue groupBy (_._1) map {case (k, v) => (k, v.map(_._2).sum)} toList
// List(at home -> 6, at work -> 7, at david's -> 3)