Skip to content

Instantly share code, notes, and snippets.

import { stringify } from "query-string";
import { fetchUtils } from "ra-core";
const bootDataProvider = (
apiUrl,
httpClient = fetchUtils.fetchJson,
countHeader = "X-Total-Count"
) => ({
getList: (resource, params) => {
const { page, perPage } = params.pagination;
@deluan
deluan / pm-auctions.20s.rb
Created October 25, 2019 14:31
Pulsed Media Auction watcher for BitBar
#!/usr/bin/env ruby
require 'open-uri'
require 'date'
require 'json'
AUCTION_URL="http://pulsedmedia.com/seedbox-auctions.php"
PRODUCT_INFO_URL="http://pulsedmedia.com/clients/widgets/productsinfo.php"
BUY_URL="http://pulsedmedia.com/clients/cart.php?a=add&pid=210&billingcycle=monthly"
@deluan
deluan / alias.sh
Last active June 8, 2019 16:15
My ZSH/Bash custom functions
alias vauth='vault login --method=github'
alias pstree='pstree -g 2'
alias l='ls -lah'
alias la='ls -lAh'
alias ll='ls -lh'
alias ls='ls -G'
alias lsa='ls -lah'
alias grep='grep --color=auto --exclude-dir={.bzr,CVS,.git,.hg,.svn}'
alias ddc='docker-compose'
@deluan
deluan / README.md
Last active October 6, 2016 16:33
README for Checkman Simulator

Checkman Simulator

This plugin simulates Checkman functionality, allowing you to use all its plugins and configuring checks in external files. It downloads Checkman's plugins on demand, so you don't need to install Checkman itself.

Available check plugins: HTTP, GoCD, Concourse, Jenkins, Travis, Semaphore, Codeship, CircleCI, Airbrake, GitHub, Pivotal Tracker, TDDium and SnapCI.

To learn more about Checkman and its existing plugins, see:

@deluan
deluan / dependency_pom.xml
Last active October 5, 2016 15:02
Adding shiro-faces taglib to your maven project
<dependency>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-faces</artifactId>
<!-- See the latest version on the project's homepage -->
<version>2.0</version>
</dependency>
@deluan
deluan / crypt.go
Created September 9, 2016 12:33
Testing bcrypt in GoLang
///usr/bin/env go run "$0" "$@"; exit;
package main
import (
"fmt"
"os"
"golang.org/x/crypto/bcrypt"
)
@deluan
deluan / mc.go
Created September 8, 2016 22:08
Test for multiconfig on Go 1.7
///usr/bin/env go run "$0" "$@"; exit;
package main
import "github.com/koding/multiconfig"
type Server struct {
Name string `required:"true"`
Port int `default:"6060"`
Enabled bool
@deluan
deluan / extract_itunes_artwork.sh
Created March 7, 2016 15:59
Script to transform .itc files into images (JPG or PNG)
#!/bin/bash
# Script to transfort .itc files into images (JPG or PNG)
#
# .itc files are located in ~/Music/iTunes/Album Artwork
#
# This script uses (/!\ needs ) ImageMagick's convert, hexdump, printf and dd.
#
# This script might be a little slow, You might want to look at Simon Kennedy's work at http://www.sffjunkie.co.uk/python-itc.html
AlbumArtwork="${HOME}/Music/iTunes/Album Artwork"
@deluan
deluan / subsonic_upgrade.yml
Last active February 20, 2016 19:42
Upgrade Subsonic on Mac OS X
- hosts: all
gather_facts: no
vars:
- release_tag: "{{latest_release.stdout}}"
- repository: EugeneKay/subsonic
- war_name: subsonic-{{release_tag}}.war
- release_url: https://github.com/{{repository}}/releases/download/{{release_tag}}/{{war_name}}
- app_path: /Applications/Subsonic.app
- war_path: "{{app_path}}/Contents/Resources"
@deluan
deluan / robot.js
Created December 8, 2012 15:42 — forked from kjaku/robot.js
Bubu
var Robot = function(robot) {
// var robot = ev.robot;
}
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
robot.clone();
robot.rotateCannon(360);
robot.turn(360)