Skip to content

Instantly share code, notes, and snippets.

@andyshinn
andyshinn / README.md
Last active April 16, 2025 14:19
Terraform variables per-workspace
$ terraform workspace new staging   
Created and switched to workspace "staging"!

You're now on a new, empty workspace. Workspaces isolate their state,
so if you run "terraform plan" Terraform will not see any existing state
for this configuration.
@skellertor
skellertor / s3 hack
Created September 15, 2018 17:20
s3 static hosting redirect all requests to index.html
Create S3 bucket, for example: react
Create CloudFront distributions with these settings:
Default Root Object: index.html
Origin Domain Name: S3 bucket domain, for example: react.s3.amazonaws.com
Go to Error Pages tab, click on Create Custom Error Response:
HTTP Error Code: 403: Forbidden (404: Not Found, in case of S3 Static Website)
Customize Error Response: Yes
Response Page Path: /index.html
HTTP Response Code: 200: OK
Click on Create
@tadast
tadast / Paint slack black.md
Last active August 24, 2024 11:18
Update the Mac Desktop slack CSS

In the console

export SLACK_DEVELOPER_MENU=true
open /Applications/Slack.app

In slack UI

right-click on anything -> inspect element

@ConorPKeegan
ConorPKeegan / TestlinkReport.md
Created August 9, 2016 14:26
How to create a new report in Testlink

Creating a new report in Testlink

To create a new report in Testlink, there are a number of steps to follow:

  1. Create a PHP file inside lib/results/ which will hold all of the code necessary to generate the report for all of the different formats that you want hte report to be supported for. * The file should probably use the template engine Smarty to generate the reports to display, especially the HTML reports. * Examples of other reports are found in the same folder.
  2. Added the custom report to the configuration file /cfg/custom_reports.cfg.php. * The configuration is added in the following format, appeneded to the end of the file, but before ?>: ``` $tlCfg->reports_list['MY_REPORT'] = array( 'title' => 'link_MY_REPORT',
@maplpro
maplpro / cherrypy_srv.py
Created September 20, 2010 10:39
cherrypy simple example and config file
import cherrypy
from jinja2 import Environment, Template, FileSystemLoader
env = Environment( loader = FileSystemLoader('./templates') )
class Root:
@cherrypy.expose
def index(self):
return env.get_template( "index.html" ).render( months = [ '2010-01', '2010-02', '2010-03', '2010-04', '2010-05', '2010-06' ] )