This script only works for older versions of Spotify for Linux.
An actively developed admute script for Spotify on Linux can be found here: https://github.com/SecUpwN/Spotify-AdKiller
#!/bin/sh | |
# ------------------------------------------------------------------------------ | |
# SOME INFOS : fairly standard (debian) init script. | |
# Note that node doesn't create a PID file (hence --make-pidfile) | |
# has to be run in the background (hence --background) | |
# and NOT as root (hence --chuid) | |
# | |
# MORE INFOS : INIT SCRIPT http://www.debian.org/doc/debian-policy/ch-opersys.html#s-sysvinit | |
# INIT-INFO RULES http://wiki.debian.org/LSBInitScripts | |
# INSTALL/REMOVE http://www.debian-administration.org/articles/28 |
// ==UserScript== | |
// @match https://objectreload.basecamphq.com/projects/* | |
// ==/UserScript== | |
var container = document.getElementById('report_link_block'), | |
link = document.createElement('a'), | |
content = document.createTextNode('Create a daily report'), | |
date = new Date(), | |
user, | |
path; |
# Configuring sound server | |
# Tested on Ubuntu 11.10 | |
sudo apt-get install pulseaudio-module-zeroconf | |
# Change /etc/default/pulseaudio file on server to contain: | |
PULSEAUDIO_SYSTEM_START=1 | |
DISALLOW_MODULE_LOADING=1 |
This script only works for older versions of Spotify for Linux.
An actively developed admute script for Spotify on Linux can be found here: https://github.com/SecUpwN/Spotify-AdKiller
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
require 'rubygems' | |
require 'benchmark' | |
require 'httparty' | |
@picasa_user = '117499753694301708125' | |
class XmlFetcher | |
include HTTParty | |
format :xml | |
end |
In order to make it easier to verify Active Record bugs you are encouraged to file bug report using one of the templates mentioned below .
If you are using published versions of gems then all you need to create is a single gist file like this .
If you are using master version of rails then use this template . Note that in this case both Gemfile and test file are needed .
My largest Sidekiq application had a memory leak and I was able to find and fix it in just few hours spent on analyzing Ruby's heap. In this post I'll show my profiling setup.
As you might know Ruby 2.1 introduced a few great changes to ObjectSpace, so now it's much easier to find a line of code that is allocating too many objects. Here is great post explaining how it's working.
I was too lazy to set up some seeding and run it locally, so I checked that test suite passes when profiling is enabled and pushed debugging to production. Production environment also suited me better since my jobs data can't be fully random generated.
So, in order to profile your worker, add this to your Sidekiq configuration:
if ENV["PROFILE"]
require 'redis' | |
require 'redis-namespace' | |
class Limiter | |
def initialize(name:, threshold:, interval:, time_span: 600, bucket_span: 5) | |
@name, @threshold, @interval, @time_span, @bucket_span = name, threshold, interval, time_span, bucket_span | |
raise ArgumentError if @interval > @time_span || @interval < @bucket_span | |
@redis ||= Redis::Namespace.new(:limiter, redis: $redis || Redis.new) |
Example of Kamal deployment from Github Actions.
Add your applications .env
variables to the Github repo as a repository secret, you can find this under the repo settings => secrets and variables => actions
https://github.com/username/repo_name/settings/secrets/actions
you are going to need an ssh private key that your deployment server is aware of (add public key to servers .ssh/authorized_keys) and add the ssh private key as a repo secret
create action workflows