Skip to content

Instantly share code, notes, and snippets.

View williamd1k0's full-sized avatar
🌈
Working with Godot Engine and Flutter

Tumeo williamd1k0

🌈
Working with Godot Engine and Flutter
View GitHub Profile
# -*- encoding: utf-8 -*-
# um número binário qualquer (trocar por um input)
bit = "1011"
# um array que vai receber o número bit a bit
bits = []
# variável que vai ser usada para o resultado
base10 = 0
# loop para transformar a string em um array
for char in bit:
@williamd1k0
williamd1k0 / styles.less
Created October 2, 2015 20:20
Personalização do tree-view do Atom para status do Git.
.status-modified{ /*Modifica cor de arquivos modificados*/
/*color: #xxx !important;*/
}
.status-added{ /*Modifica cor de arquivos criados*/
/*color: #xxx !important;*/
}
.list-tree li.list-nested-item[class*='status-added'] > .list-item {
/*Modifica cor de pastas adicionadas*/
@williamd1k0
williamd1k0 / stockler.js
Last active October 15, 2015 16:35
Stockler's Like - Use com sabedoria -
var stockler = document.querySelectorAll("a.UFILikeLink");
for(var i = 0; i < stockler.length; i++){
$(stockler[i]).click();
}
@williamd1k0
williamd1k0 / stockler-v2.js
Last active October 16, 2015 05:12
Stockler's Like - Use com sabedoria -
var Stockler = {};
Stockler.assault = setInterval(likeInfinity, 700);
Stockler.targets = document.querySelectorAll("a.UFILikeLink");
Stockler.likeCounter = 0;
function likeInfinity(){
try{
if(Stockler.targets[Stockler.likeCounter].textContent == "Curtir"){
$(Stockler.targets[Stockler.likeCounter]).click();
}
two_window_vbox
large_button
picker_text
large_button_text
skip_indicator
nvl_entry
list_row'
caption
_viewport
const fun_allowed = false;
window.onload = function() {
function isDevTools(key) {
return (key.keyCode === 123) || (key.keyCode === 73 && key.ctrlKey && key.shiftKey);
}
function isSourceCode(key){
return key.keyCode === 85 && key.ctrlKey;
@williamd1k0
williamd1k0 / demo_markdown.md
Last active October 14, 2024 05:24
Ren'Py - Demo Script Example

Ren'Py language using the pre/code in Markdown

Using pre/code:


```renpy
# Ren'Py statements
```
:: Simple build-log
echo. >> build-log.txt
echo -- Build done -- >> build-log.txt
echo %date% >> build-log.txt
echo %time% >> build-log.txt
## Bloco Python para criar uma Classe
# - Dependendo do tamanho pode ficar em outro arquivo
# - Uma classe é basicamente um contrutor (molde) para um objeto.
# - Um objeto precisa ser instanciado, como um Character por exemplo.
# - Ex: define lorem = Character("Lorem Ipsum")
# [*] [1] [2]
# 1 = Objeto instanciado.
# 2 = Classe Character.
# * = A palavra-chave "define" é uma mistura de "init + $".
# "init" = Bloco que é executado antes de iniciar o jogo.
@williamd1k0
williamd1k0 / DOM-tricks.js
Last active April 15, 2016 00:28
Some DOM tricks
// Replace a child
Element.prototype.replace = function(el1, el2){
if(typeof el2 === 'string') el2 = new Text(el2);
this.insertBefore(el1, el2);
this.removeChild(el1);
};
// Update content of an element
Element.prototype.update = function(el){
if(typeof el === 'string') el = new Text(el);