Skip to content

Instantly share code, notes, and snippets.

View evsasse's full-sized avatar
🚀
🇧🇷

Evandro Sasse evsasse

🚀
🇧🇷
View GitHub Profile
@evsasse
evsasse / setup.sh
Last active November 16, 2023 14:11
Setting up new machine
# Open Safari to come to github.com/evsasse
# Open the default "Terminal" app
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# That can take a while, it needs to download some Xcode utils. While that runs:
# - You can setup the "Dock" on MacOS settings to be smaller, and hidden by default
# - Configure the Download folder and Recent folder to be pinned to the dock
# - Turn off "Automatically rearrange Spaces"
@evsasse
evsasse / changes.diff
Created April 14, 2021 23:49
Fix for admin omniauth work side-by-side with Shopify shop authentication
--- a/app/models/admin.rb
+++ b/app/models/admin.rb
@@ -1,10 +1,12 @@
# frozen_string_literal: true
class Admin < ApplicationRecord
- devise :omniauthable, omniauth_providers: %i[developer google_oauth2]
-
+ # To not mess up Shopify's omniauth, we can't set omniauthable here!
+ # Check `config/routes/admin.rb` for more details about the custom sign in setup
@evsasse
evsasse / script.js
Created March 29, 2020 13:18
Load youtube playlist into csv
var jq = document.createElement('script');
jq.src = "https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js";
document.getElementsByTagName('head')[0].appendChild(jq);
// WAIT!
// WAIT!
// WAIT!
jQuery.noConflict();
gcc -E hello.c -o hello.i
gcc -S hello.i -o hello.s
gcc -c hello.i -o hello.o
``.rodata`` => read-only data
objdump -h hello.o => headers
objdump -t hello.o => tabela de simbolos
objdump -r hello.o => entradas de relocacao
objdump -D hello.o => assemblt de todas as sessoes
objdump -s hello.o => dados
@evsasse
evsasse / app-slash-index.html
Last active January 19, 2017 13:24
webpack's file-loader [name] different behaviour on windows and linux
<!DOCTYPE html>
<html>
<head>
<title>Your app name</title>
<meta charset="utf-8">
</head>
<body>
<div id="appMountPoint"></div>
outside
<script src="bundle.js"></script>
// Information Security
// Waseda University 2016-1
// Evandro Sasse - 1W15C902-3
function pad(bits, size){
while(bits.length < size)
bits = "0"+bits;
return bits;
}
@evsasse
evsasse / main.js
Created December 3, 2015 13:12
Change chrome default html5 player speed
var player = document.getElementsByTagName('video')[0];
player.playbackRate = 1.25
//player.playbackRate = 1.5
//player.playbackRate = 2
@evsasse
evsasse / gist:95f7e5c78b18deff7d85
Last active August 29, 2015 14:24
some netflix text fx
body{
font-family: monospace;
background-color: #FAFAFA
}
h1{
text-shadow: 0 1px 0 #000,
0 2px 0 #111,
0 3px 1px rgba(0,0,0,0.8),
0 4px 1px rgba(0,0,0,0.5),
@evsasse
evsasse / main.js
Last active August 29, 2015 14:21
Sum MyAnimeList Plan To Watch episodes
// Run in your plan to watch page eg:"http://myanimelist.net/animelist/YourUserNameHere&status=6&order=0"
// Simply oṕen your browser's console (F12>Console), paste and ENTER (:
///////////////////////////
// NEEDS TO BE LOGGED IN //
///////////////////////////
var a = document.querySelectorAll('td[width="70"]>span>a');
var patt = /[0-9]+$/;