Skip to content

Instantly share code, notes, and snippets.

View onlurking's full-sized avatar
:shipit:
ship it

Diogo Felix onlurking

:shipit:
ship it
View GitHub Profile
@zsviczian
zsviczian / Excalidraw Dynamic Styling.md
Last active June 18, 2023 00:40
Excalidraw Dynamic Styling
@mayaracsferreira
mayaracsferreira / oracle_survival_tips.md
Last active October 2, 2024 15:53
Oracle sql statements to get quick information about database state and get daily things done.

Oracle Survival Tips

SQL statements to get quick information about database state and get daily things done. Statements were tested on 12c Release 1 and 2 environments, but most of them also apply to 11g.

Summary

Database management
@idelem
idelem / titleUrlMarkdownClip.js
Last active November 4, 2024 22:22 — forked from bradleybossard/titleUrlMarkdownClip.js
Bookmarklet to copy current page title and url in Markdown format to clipboard, like [title](url) - Usual for posting links to resources in README.md files
javascript:(function() {
function copyToClipboard(text) {
if (window.clipboardData && window.clipboardData.setData) {
/*IE specific code path to prevent textarea being shown while dialog is visible.*/
return clipboardData.setData("Text", text);
} else if (document.queryCommandSupported && document.queryCommandSupported("copy")) {
var textarea = document.createElement("textarea");
textarea.textContent = text;
#!/usr/bin/env python
import math
import sys
from moviepy.editor import AudioClip, VideoFileClip, concatenate_videoclips
# Get average RGB of part of a frame. Frame is H * W * 3 (rgb)
# Assumes x1 < x2, y1 < y2
@stettix
stettix / things-i-believe.md
Last active November 17, 2024 14:53
Things I believe

Things I believe

This is a collection of the things I believe about software development. I have worked for years building backend and data processing systems, so read the below within that context.

Agree? Disagree? Feel free to let me know at @JanStette.

Fundamentals

Keep it simple, stupid. You ain't gonna need it.

@yyx990803
yyx990803 / commits.vue
Last active May 13, 2022 16:43
Vue examples comparisons in 2.x and function-based APIs
<template>
<div id="demo">
<h1>Latest Vue.js Commits</h1>
<template v-for="branch in branches">
<input type="radio"
:id="branch"
:value="branch"
name="branch"
v-model="currentBranch">
<label :for="branch">{{ branch }}</label>
@maledorak
maledorak / dmenu_hotkeys.py
Last active May 29, 2023 07:27
i3 hotkeys in dmenu or rofi
#!/usr/bin/env python3
import os
import sys
from re import compile
from subprocess import run, Popen, PIPE
__author__ = "Mariusz 'Maledorak' Korzekwa"
__credits__ = ["Mariusz 'Maledorak' Korzekwa"]
__license__ = "CC BY 4.0"
let mapleader=","
set nocompatible "Use Vim settings, rather then Vi settings (much better!).
filetype off " required
syntax on " syntax highlight
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
@eduardo-matos
eduardo-matos / README.md
Last active December 7, 2018 20:23
Workshop de NodeJS + Promises

NodeJS

Node é single threaded, istoé, ele é incapaz de executar duas coisas ao mesmo tempo, com exceção de operaçes de IO.

Exemplos de operação não bloqueantes: Acesso à rede, acesso à arquivos etc.
Exemplos de açes bloqueantes: Loop num array, cálculos complexos etc.

Em node, o padrão é toda função assíncrona ter uma versão síncrona, por exemplo fs.readFile e fs.readFileSync.
As verses síncronas são úteis para aplicações que não dependem de concorrência, como scripts e programas de linha de comando por exemplo.
Via de regra usamos a versão assíncrona. Em uma API, por exemplo, qualquer operação bloqueante impede que novas requisiçes sejam processadas pelo servidor, por isso é importante sempre fazer chamadas não bloqueantes.

Time Travel Debugging

Time Travel refers to the ability to record a tab and later replay it ([WebReplay][wrr]). The technology is useful for local development, where you might want to:

  • pause and step forwards or backwards
  • pause and rewind to a prior state
  • rewind to the time a console message was logged
  • rewind to the time an element had a certain style or layout
  • rewind to the time a network asset loaded