Skip to content

Instantly share code, notes, and snippets.

View trystant's full-sized avatar
💭
profile moved to github.com/mnyon-grandkru

Mark Nyon trystant

💭
profile moved to github.com/mnyon-grandkru
View GitHub Profile
@trystant
trystant / gist:1cfc49c9c44dc25e2a4b4b84da677f72
Created December 19, 2020 23:02
S3 Backup Role Bucket Policy
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "DelegateS3Access",
"Effect": "Allow",
"Principal": {
"AWS": "<INSERT BACKUP ACCOUNT ARN HERE>"
},
"Action": [

Keybase proof

I hereby claim:

  • I am trystant on github.
  • I am scorintha (https://keybase.io/scorintha) on keybase.
  • I have a public key ASC2HeAdGDvtTugg8aVbBIje2Y12FR_2pw750Eft4zv6EAo

To claim this, I am signing this object:

# rubospec function to do rubocop & rspec on files
rubospec () {
echo "running 'rubocop -a' and 'bundle exec rspec' on: $@"
rubocop -a $@
bundle exec rspec $@
}
# So it begins...
alias rbs='rubospec'
@trystant
trystant / gtk-firefox.sh
Created July 12, 2018 07:18 — forked from joekiller/gtk-firefox.sh
INSTALL FIREFOX ON AMAZON LINUX X86_64 COMPILING GTK+
#!/bin/bash
# GTK+ and Firefox for Amazon Linux
# Written by Joseph Lawson 2012-06-03
# http://joekiller.com
# http://joekiller.com/2012/06/03/install-firefox-on-amazon-linux-x86_64-compiling-gtk/
# chmod 755 ./gtk-firefox.sh
# sudo ./gtk-firefox.sh
@trystant
trystant / esources_controller_spec.rb
Created November 26, 2017 19:20
Padrino mock login for specs
# #{Padrino.root}/spec/admin/controllers/resources_controller_spec.rb
require 'spec_helper'
describe 'admin/resources_controller' do
it 'displays the resources index for the admin' do
login_as('admin')
get "/admin/resources"
expect(last_response.body).to include("Resources | Client Admin")
end
@trystant
trystant / README.md gists
Created July 5, 2017 01:13
Links to README.md templates for people to use in writing README's for their projects
Here are a list of gists and articles with information on
making a good README. I'll be expanding upon this list over
time and if you know of an item to add to this, please let
me know:
https://gist.github.com/PurpleBooth/109311bb0361f32d87a2
https://gist.github.com/jxson/1784669
https://coderwall.com/p/fy05hq/how-to-make-beautiful-github-readme
@trystant
trystant / index.css
Created June 23, 2017 14:07
JQuery Shopping List created by dennisawolff@gmail.com - https://repl.it/IxcC/55
* {
box-sizing: border-box;
}
main {
padding: 50px;
min-width: 250px;
}
h1 {
### Keybase proof
I hereby claim:
* I am trystant on github.
* I am scorintha (https://keybase.io/scorintha) on keybase.
* I have a public key ASDblkJSSMu0EpR7GVELZGx4nzSYJu60w_bInLJbT7fUJQo
To claim this, I am signing this object:
# System-wide .bashrc file for interactive bash(1) shells.
# command to mount the android file image
function mountAndroid { hdiutil attach ~/AndroidDev.dmg -mountpoint /Volumes/Android; }
# Function to upload a screenshot to grandkru.com
upload_error_image() {
screen_shot_file=`ls -at ~/Desktop/Screen* | head -1`
command="scp -2 -v \"${screen_shot_file}\" mnyon@mnyon.pairserver.com:public_html/grandkru.com/images/${1}"
echo "Running ${command}"
struct RegExp {
/**
Check password complexity
- parameter password: password to test
- parameter length: password min length
- parameter patternsToEscape: patterns that password must not contains
- parameter caseSensitivty: specify if password must conforms case sensitivity or not
- parameter numericDigits: specify if password must conforms contains numeric digits or not