Skip to content

Instantly share code, notes, and snippets.

View nazarhussain's full-sized avatar
🎯
Focusing

Nazar Hussain nazarhussain

🎯
Focusing
View GitHub Profile
@kudaba
kudaba / gh_actions_crash.md
Created November 12, 2019 05:11
Github actions: How to capture a crash dump

If an application is crashing during a github actions run then you can use this guide to capture the core as an artifact for debugging.

This guide was developed to debug Mac crashes specifically. It should mostly apply to Linux as well but getting dumps from Windows is unknown for now.

Mac / Linux

By default these systems will not be in a state where they are recording core dumps, and even when enabled you need to run with elevated permissions for a core to even be written. To capture dumps you need to do the following:

# app/admin/email_previews.rb
ActiveAdmin.register_page 'Email Previews' do
content do
div '.'
end
sidebar 'Mail Previews' do
Dir['app/mailer_previews/*_preview.rb'].each do |preview_path|
preview_mailer = File.basename(preview_path, '.rb')
@wbotelhos
wbotelhos / libreadline_6_not_found.sh
Created November 29, 2016 20:42
Library not loaded: /usr/local/opt/readline/lib/libreadline.6.dylib (LoadError)
ln -s /usr/local/opt/readline/lib/libreadline.7.0.dylib /usr/local/opt/readline/lib/libreadline.6.dylib
@damondouglas
damondouglas / Angular-Dart-Check-Lists.md
Last active April 27, 2017 06:45
Angular Dart Check Lists

Angular Dart Check List

The following shows what to watch out for when making Angular Dart applications. For more information about Angular Dart, see angulardart.org.

Table Of Contents

@branneman
branneman / better-nodejs-require-paths.md
Last active April 27, 2024 04:16
Better local require() paths for Node.js

Better local require() paths for Node.js

Problem

When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:

const Article = require('../../../../app/models/article');

Those suck for maintenance and they're ugly.

Possible solutions

@6174
6174 / Random-string
Created July 23, 2013 13:36
Generate a random string in JavaScript In a short and fast way!
//http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript
Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);
@chmouel
chmouel / upload-to-rackspace-cloud-file.sh
Created June 9, 2010 18:53
Upload to RackSpace CloudFiles from shell with curl.
#!/bin/bash
# Author: Chmouel Boudjnah <chmouel.boudjnah@rackspace.co.uk>
# Not officially supported by Rackspace only as a best effort basis :)
# Define yes to make it to copy to url to clipboard (via a shortened url
# service) You need to have the software xclip installed in your system.
COPY_URL_TO_CLIPBOARD=yes
# Containers to ignore in the list
CONTAINERS_TO_IGNORE=".CDN_ACCESS_LOGS"