Skip to content

Instantly share code, notes, and snippets.

View edersonbadeca's full-sized avatar
💭
Creating a better world line by line

Ederson Badeca edersonbadeca

💭
Creating a better world line by line
View GitHub Profile
@edersonbadeca
edersonbadeca / badwolf.itermcolors
Created May 10, 2023 13:32 — forked from mattijs/badwolf.itermcolors
badwolf iTerm2 colors
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Blue Component</key>
<real>0.07884746789932251</real>
<key>Green Component</key>
<real>0.081504985690116882</real>
---
format_version: 1.1.0
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
trigger_map:
- push_branch: "*"
workflow: tests
workflows:
_tests_setup:
steps:
- activate-ssh-key: {}
@edersonbadeca
edersonbadeca / python-es6-comparison.md
Created December 6, 2018 16:26 — forked from revolunet/python-es6-comparison.md
# Python VS ES6 syntax comparison

Python VS ES6 syntax comparison

Python syntax here : 2.7 - online REPL

Javascript ES6 via Babel transpilation - online REPL

Imports

import math
import asyncio
loop = asyncio.get_event_loop()
async def hello():
await asyncio.sleep(3)
print('Hello!')
if __name__ == '__main__':
loop.run_until_complete(hello())
@edersonbadeca
edersonbadeca / Python Utility for asynchronous mocking.py
Created October 23, 2017 17:37
Python Utility for asynchronous mocking
import asyncio
from unittest import mock
class AsyncMock(mock.MagicMock):
@asyncio.coroutine
def __call__(self, *args, **kwargs):
return super(AsyncMock, self).__call__(*args, **kwargs)
# Alternative using Tornado...
@edersonbadeca
edersonbadeca / cx_oracle_instructions.md
Created July 20, 2017 21:27 — forked from thom-nic/cx_oracle_instructions.md
Installing CX Oracle for Python & Mac OS X. Instructions exist around the web, but they seem to be piecemeal and incomplete.
@edersonbadeca
edersonbadeca / git-notes.md
Created June 23, 2016 19:16 — forked from topheman/git-notes.md
Git notes cheat sheet
### Testing if the client is a mobile or a desktop.
### The selection is based on the usual UA strings for desktop browsers.
## Testing a user agent using a method that reverts the logic of the
## UA detection. Inspired by notnotmobile.appspot.com.
map $http_user_agent $is_desktop {
default 0;
~*linux.*android|windows\s+(?:ce|phone) 0; # exceptions to the rule
~*spider|crawl|slurp|bot 1; # bots
~*windows|linux|os\s+x\s*[\d\._]+|solaris|bsd 1; # OSes