Skip to content

Instantly share code, notes, and snippets.

View renews's full-sized avatar
😀

Renê Schneider renews

😀
View GitHub Profile
@APiercey
APiercey / 1_framework.rb
Last active March 31, 2023 19:42
Ruby 6 Line Micro Testing Framework
module MT
def self.assert(desc, left, operator, right = nil) = puts (if msgs = self.send(operator, desc, left, right) then failure(msgs) else success(desc) end)
def self.test(desc, &block) ; puts desc ; yield ; puts "\n" end
def self.success(msg) = " \e[32m#{msg}\e[0m"
def self.failure(msgs) = " \e[31m#{msgs.join("\n ")}\e[0m"
end
@sbinlondon
sbinlondon / synthwaveglow.md
Last active February 22, 2024 22:40
Get the synth wave glow theme working for VS Code on Mac

Get the synth wave glow working for VS Code on Mac

These notes are pretty much the same steps as the two extensions list, it's just that I had to collate them together because neither seems to list it fully in the proper order.

  1. Install Synthwave ’84/Synthwave + Fluoromachine theme on VS Code (I used the Fluoromachine one)

  2. Install Custom CSS and JS Loader

  3. Command + Shift + P to open command palette > "Preferences: Open settings (JSON)"

@levelsio
levelsio / makebook_obfuscate.php
Last active April 20, 2024 01:51
Obfuscate your ebook so that people who didn't pay can read it, partly
<?php
/*
I wrote this function to progressively obfuscate text in MAKEbook.io. When it KINDA worked, I just used it.
It can take a lot of improvement. I kinda just tweaked the values until it was good enough. It's not SO progressive though.
It takes all the output of your PHP scripts via ob_start(), reroutes that to the obfuscation function.
You should check if user paid for book or not, then either run ob_start or not!
@systemnate
systemnate / VueTesting.md
Last active August 8, 2017 14:19
Single File Component Testing with Vue and Rails (Karma, Jasmine, Avoriaz)

Unit Testing

This wiki will demonstrate how to setup and test Vue components. I am assuming that Vue is already setup in the project using the webpacker gem.

This guide will use Karma, Jasmine, and Avoriaz for testing.

Karma - A test runner for unit tests.

Karma is essentially a tool which spawns a web server that executes source code against test code for each of the browsers connected. The results of each test against each browser are examined and displayed via the command line to the developer such that they can see which browsers and tests passed or failed.

Jasmine - A testing framework.

"""
An alternative text clip for Moviepy, relying on Gizeh instead of ImageMagick
Advantages:
- Super fast (20x faster)
- no need to install imagemagick
- full-vector graphic, no aliasing problems
- Easier font names
Disadvantages:
@pkazmierczak
pkazmierczak / asw-csgo.yaml
Last active April 1, 2020 11:18
CounterStrike Global Offensive linux server AWS CF template
---
AWSTemplateFormatVersion: '2010-09-09'
Description: CounterStrike Global Offensive linux server template
Mappings:
AWSRegion2AMI:
eu-central-1:
AMI: ami-26c43149
eu-west-1:
AMI: ami-ed82e39e
Parameters:
@emilsoman
emilsoman / phoenix_to_umbrella
Last active April 12, 2024 11:26
How to move an existing phoenix app under an umbrella app
How to convert existing phoenix app to an umbrella app.
https://elixir-lang.slack.com/archives/phoenix/p1472921051000134
chrismccord [10:14 PM]
@alanpeabody yes, it's straightforward
[10:14]
1) mix new my_umbrella --umbrella
@amokan
amokan / README.md
Created April 25, 2016 18:53
Elixir Crawling With Pools For Fun and Profit

PoolCrawler

This is a simple example in response to https://www.reddit.com/r/elixir/comments/4gcnmi/struggling_with_getting_this_worker_pool_and/ as well as a reminder for myself

I used https://github.com/midas/conqueuer to do something similar to the original poster was trying to accomplish.

Some code has been removed to make it simple to follow and just dropping this into a project will not compile. Be sure to look at the comments.

I combined and/or renamed files in this gist to group things together as well.

@VMBindraban
VMBindraban / varnish-cheatcheet.md
Last active September 5, 2020 22:49
Varnish 3 cheatsheet

###Some don't work yet.

Get the top request methods

varnishtop -i RxRequest

Top urls that missed the cache.

varnishtop -i TxURL

@bpierre
bpierre / README.md
Last active February 15, 2024 18:40
Switch To Vim For Good

Switch To Vim For Good

NOTE: This guide has moved to https://github.com/bpierre/switch-to-vim-for-good

This guide is coming from an email I used to send to newcomers to Vim. It is not intended to be a complete guide, it is about how I switched myself.

My decision to switch to Vim has been made a long time ago. Coming from TextMate 1, I wanted to learn an editor that is Open Source (so I don’t lose my time learning a tool that can be killed), cross platform (so I can use it everywhere), and powerful enough (so I won’t regret TextMate). For these reasons, Vim has always been the editor I wanted to learn, but it took me several years before I did it in a way that works for me. I tried to switch progressively, using the Janus Vim distribution for a few months, then got back to using TextMate 2 for a time, waiting for the next attempt… here is what finally worked for me.

Original gist with comments: https://gist.github.com/bpierre/0a0025d348b6001394e0