Skip to content

Instantly share code, notes, and snippets.

View RigoOnRails's full-sized avatar
🤎
Chasing dreams

Rigo RigoOnRails

🤎
Chasing dreams
  • California
View GitHub Profile
@podotki
podotki / tipsi-stripe.d.ts
Created June 19, 2020 12:47
Typings for tipsi-stripe library corresponding to 8.0.0-beta.10 version
declare module 'tipsi-stripe' {
export interface StripeOptions {
publishableKey: string
merchantId?: string
androidPayMode?: string
}
export type AccountHolderType = 'company' | 'individual'
export type PaymentMethodAddress = {
@satendra02
satendra02 / app.DockerFile
Last active March 3, 2024 10:13
docker+rails+puma+nginx+postgres (Production ready)
FROM ruby:2.3.1
# Install dependencies
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs
# Set an environment variable where the Rails app is installed to inside of Docker image:
ENV RAILS_ROOT /var/www/app_name
RUN mkdir -p $RAILS_ROOT
# Set working directory, where the commands will be ran:

WannaCry|WannaDecrypt0r NSA-Cyberweapon-Powered Ransomware Worm

  • Virus Name: WannaCrypt, WannaCry, WanaCrypt0r, WCrypt, WCRY
  • Vector: All Windows versions before Windows 10 are vulnerable if not patched for MS-17-010. It uses EternalBlue MS17-010 to propagate.
  • Ransom: between $300 to $600. There is code to 'rm' (delete) files in the virus. Seems to reset if the virus crashes.
  • Backdooring: The worm loops through every RDP session on a system to run the ransomware as that user. It also installs the DOUBLEPULSAR backdoor. It corrupts shadow volumes to make recovery harder. (source: malwarebytes)
  • Kill switch: If the website www.iuqerfsodp9ifjaposdfjhgosurijfaewrwergwea.com is up the virus exits instead of infecting the host. (source: malwarebytes). This domain has been sinkholed, stopping the spread of the worm. Will not work if proxied (source).

update: A minor variant of the viru

@alkrauss48
alkrauss48 / Dockerfile
Last active November 10, 2022 16:24
Running a docker container as a non-root user
# By default, Docker containers run as the root user. This is bad because:
# 1) You're more likely to modify up settings that you shouldn't be
# 2) If an attacker gets access to your container - well, that's bad if they're root.
# Here's how you can run change a Docker container to run as a non-root user
## CREATE APP USER ##
# Create the home directory for the new app user.
RUN mkdir -p /home/app
@iloveitaly
iloveitaly / capybara_fill_stripe_elements.rb
Created March 4, 2017 21:21
Fill in a Stripe Elements (https://stripe.com/docs/elements) credit card field using capybara
def fill_stripe_elements(card)
using_wait_time(15) { within_frame('stripeField_card_element0') do
card.to_s.chars.each do |piece|
find_field('cardnumber').send_keys(piece)
end
find_field('exp-date').send_keys("0122")
find_field('cvc').send_keys '123'
find_field('postal').send_keys '19335'
end }
@imbradmiller
imbradmiller / random-gems-everywhere
Last active December 10, 2023 21:05
Random Gems Everywhere
let totalGems = randomNumberOfGems
var gemCon = 0
func navigate () {
while !isBlocked {
moveForward()
if isOnGem {
collectGem()
gemCon += 1
@nrollr
nrollr / MySQL_macOS_Sierra.md
Last active June 7, 2024 20:53
Install MySQL on Sierra using Homebrew

Install MySQL on macOS Sierra

This procedure explains how to install MySQL using Homebrew on macOS Sierra 10.12

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Note: Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.

Install MySQL

At this time of writing, Homebrew has MySQL version 5.7.15 as default formulae in its main repository :

<div id="pagination" class="pagination">
{% if paginate.previous.is_link %}
<a href="{{ paginate.previous.url }}" class="pagination-item pagination-previous">Previous</a>
{% else %}
<a class="pagination-item pagination-previous pagination-previous--disabled">Previous</a>
{% endif %}
{% for part in paginate.parts %}
{% if part.is_link %}
<a href="{{part.url}}"class="pagination-item">{{ part.title }}</a>
{% elsif current_page %}
@wgins
wgins / people2csv.py
Last active May 31, 2018 19:05 — forked from marinamixpanel/people2csv.py
Mixpanel - Exporting people profiles to CSV
''' people export'''
import base64
import csv
import sys
import time
import urllib # for url encoding
import urllib2 # for sending requests
try:
@joekr
joekr / Dockerfile-Nginx
Last active November 26, 2023 09:19
Kubernetes + Rails (NGINX & Unicorn) on GCE
# Set nginx base image
FROM nginx
# Copy custom configuration file from the current directory
COPY nginx.conf /etc/nginx/nginx.conf