Skip to content

Instantly share code, notes, and snippets.

@philsnow
philsnow / walkthrough.md
Last active January 8, 2024 16:22
Another way to manually add another site to Firefox Multi-Account Containers

Another way to manually add another site to Firefox Multi-Account Containers

Multi-Account Containers and Temporary Containers are great extensions for a great browser. I get really frustrated when I can't make them work together the way I want, though.

The most common problem I have is when some site redirects through a bunch of subdomains (usually during login). Because of Temporary Containers, each redirect opens in a new tab+container which doesn't bring cookies from the other container, and the login flow breaks.

If the resulting page leaves you on the subdomain that broke the flow, you can use the menu to add another "always open in container" rule, but if it didn't (because on error the site redirects you to the first subdomain or somewhere else), you can't use that menu. Some people have found workarounds that work for them (like [changing `networ

Technical details for https://stackoverflow.com/a/44169445/6730571

Details of investigation:

On a base system, /usr/bin/java is a symlink that points to /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java, which is an Apple wrapper tool that locates and executes the actual java.

(Do not touch anything in those 2 system directories. It should actually be impossible due to "System Integrity Protection" anyway.)

If you don't have Java installed, attempting to execute java will open a dialog that invites you to install it.

@heyimalex
heyimalex / example.js
Created September 21, 2016 16:15
Using mock-fs with jest
// __tests__/example.js
jest.mock('fs');
it('should serve as a nice example', () => {
const fs = require('fs')
// fs can be set up at any point by calling __configureFs.
fs.__configureFs({
'/test': {
@CMCDragonkai
CMCDragonkai / http_streaming.md
Last active April 25, 2024 17:19
HTTP Streaming (or Chunked vs Store & Forward)

HTTP Streaming (or Chunked vs Store & Forward)

The standard way of understanding the HTTP protocol is via the request reply pattern. Each HTTP transaction consists of a finitely bounded HTTP request and a finitely bounded HTTP response.

However it's also possible for both parts of an HTTP 1.1 transaction to stream their possibly infinitely bounded data. The advantages is that the sender can send data that is beyond the sender's memory limit, and the receiver can act on

@sylvaingi
sylvaingi / HOWTO.md
Last active August 29, 2015 14:06 — forked from tdragonite/HOWTO.md
  1. Find the id, name and day of the show for the artist you want to load, replace whitespace or other symbols with underscores. You can find all the information here: https://appletv.itunesfestival.com/1b/en-GB/gb.json looking in the source code or by searching the artist on iTunes through Google and taking the ID from the url (p.e. Tony Bennet: https://itunes.apple.com/us/artist/tony-bennett/id484980)

  2. Launch the script: ./itunes-festival.sh day id_artist

    Example: ./itunes-festival.sh 06 484980_tonybennett

  3. Have fun.

Working for iTunes Festival September 2014. Also on OS X. Tnx to the original creator!

@ahanmal
ahanmal / README.md
Last active June 23, 2016 14:21
Dashing JIRA Issues Open Widget

##JIRA Open Issues Widget For Dashing Simple widget that fetches current issues from JIRA by using a JQL Search. Data is displayed using th e included Numbers widget in Dashing.

##Usage

  1. Install Widget By Adding jira.rb to the jobs directory, or install by calling dashing install 3186a5869684bb514ad3

  2. Add gem 'jira-ruby', :require => 'jira' to your Gemfile

  3. Change to match your needs:

@jedi4ever
jedi4ever / gist:898114
Created April 1, 2011 13:06
update jenkins Updatecenter from CLI
$ java -jar jenkins-cli.jar -s http://localhost:9000 install-plugin findbugs
findbugs is neither a valid file, URL, nor a plugin artifact name in the update center
No update center data is retrieved yet from: http://updates.jenkins-ci.org/update-center.json
findbugs looks like a short plugin name. Did you mean 'null'?
# Specifying a full URL works!
$ java -jar jenkins-cli.jar -s http://localhost:9020 install-plugin http://updates.jenkins-ci.org/download/plugins/AdaptivePlugin/0.1/AdaptivePlugin.hpi
# Get the update center ourself
#!/usr/bin/env ruby
def find_deps(cookbook_dir)
nel = Hash.new { |h, k| h[k] = [] }
Dir.glob("#{cookbook_dir}/*/").each do |r|
deps_for(r, nel)
end
nel
end