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
version: '2' | |
services: | |
postgres: | |
image: postgres | |
environment: | |
POSTGRES_PASSWORD: temp1234 | |
ports: | |
- 5432:5432 | |
volumes: | |
- db_data:/var/lib/postgresql |
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
# spec/support/jobs.rb | |
ActiveJob::Base.queue_adapter = :test | |
module PerformJobsSupport | |
def perform_jobs_on(klass, *method_names) | |
klass.class_eval do | |
include ActiveJob::TestHelper | |
method_names.each do |method_name| | |
alias_method "origin_#{method_name}", method_name |
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
on run | |
# TODAY - Returns today's date! | |
# Create your own Service, to avoid 3rd Party software (WordService, etc.) | |
# In Automator: | |
# > Service receives 'no input' in 'any application' | |
# > Output replaces selected text | |
# Add Shortcut (e.g. Ctrl+Cmd+T - it's hard to find a free shortcut!): | |
# > Preferences > Keyboard > Keyboard Shortcuts > Services | |
# When setting up Keyboard Shortcut, *exit* the target app before testing. (It seems shortcuts are only refreshed when app is launched) | |
# Adjust 'Short' Date format |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
<style> | |
table { text-align: center; } | |
.name { display: inline-block; width: 60px; background-color: #ccc; height: 16px;} | |
</style> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
<style> | |
table { text-align: center; } | |
.name { display: inline-block; width: 60px; background-color: #ccc; height: 16px;} | |
</style> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
<style> | |
table { text-align: center; } | |
.name { display: inline-block; width: 60px; background-color: #ccc; height: 16px;} | |
</style> |
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
// ==UserScript== | |
// @name Basecamp Todo Auto Number | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Prefix todo's title with an autoincrement number by shortcut Cmd+click | |
// @author You | |
// @require https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js | |
// @match https://3.basecamp.com/* | |
// ==/UserScript== |
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
chrome.runtime.onMessage.addListener( | |
function(message, sender, sendResponse) { | |
console.log(`${message} in content1`) | |
sendResponse(`${message} from content1`) | |
// setTimeout(() => { | |
// sendResponse(`${message} from content1`) | |
// }, 2000) | |
// | |
// return true | |
} |
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
#script to ping multiple websites | |
#add websites you want to ping to the websites.txt file | |
#the output will be saved into results.txt | |
websitesFile=websites.txt | |
websiteList=$(cat $websitesFile |tr "\n" " ") | |
websites=($websiteList) | |
timeOut=1 | |
outputFile=results.txt |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# This script helps removing Git branches. | |
# Run it from a git repo dir. It will open the Git branches list | |
# in your favorite editor. Delete some branches from the list. | |
# Save and close the file. The script applies the changes to the repo. | |
from subprocess import call, Popen, PIPE | |
from os import getenv |