Skip to content

Instantly share code, notes, and snippets.

View wviana's full-sized avatar
💭
Vim Vi e Venci

Wesley Viana wviana

💭
Vim Vi e Venci
View GitHub Profile
@wviana
wviana / k3s.log
Created June 11, 2022 00:38
K3s not starting up
systemd[1]: Started Lightweight Kubernetes.
s[1859051]: I0607 1859051 tlsconfig.go:240] "Starting DynamicServingCertificateController
s[1859051]: I0607 1859051 autoregister_controller.go:141] Starting autoregister controller
s[1859051]: I0607 1859051 controller.go:83] Starting OpenAPI AggregationController
s[1859051]: I0607 1859051 apf_controller.go:317] Starting API Priority and Fairness config controller
s[1859051]: I0607 1859051 dynamic_serving_content.go:131] "Starting controller" name="aggregator-proxy-cert::/var/lib/rancher/k3s/server/tls/client-auth-proxy.crt::/var/lib/rancher/k3s/server/tls/client-auth-proxy.key
s[1859051]: I0607 1859051 cache.go:32] Waiting for caches to sync for autoregister controller
s[1859051]: I0607 1859051 apiservice_controller.go:97] Starting APIServiceRegistrationController
s[1859051]: I0607 1859051 cache.go:32] Waiting for caches to sync for APIServiceRegistrationController controller
s[1859051]: I0607 1859051 available_controller.go:491] Starting AvailableConditionControlle
@wviana
wviana / README.md
Last active October 3, 2024 04:35
How to install RetroArch Game Emulator on Xbox One, probably works on all modern Xbox ( One, One S, One X, Series S and Series X)

Installing and setting up RetroArch on Xbox

TLDR

  • Boot Into DevMode using the most recent (green) app in Xbox Microsoft Store.
  • Access URL from Dev Home, https, will have to trust certificate.
  • First upload App, later will be asked for Libraries/Dependencies (Take a look at RetroArch Download Page, look for Xbox.
  • In Dev Home go over RetroArch, press select/view, info, change from App to Game. This will enable reading from memory stick.
  • You need to setup a input hotkey for accessing RetroArch menu, other than it you'll have to close RetroArch to quit game.
  • By default just D-Pad works, there is an option to enable analogue.
@wviana
wviana / main.py
Last active April 12, 2020 17:29
Getting help about why does this code doesn't shows any image.
from PIL import Image, ImageTk
from io import BytesIO
import requests
import tkinter as tk
from collections import namedtuple
import sys
creative_common_image_url = 'https://api.creativecommons.engineering/v1/images'
@wviana
wviana / r_python_community_info.txt
Created August 28, 2019 20:46
After some time trying to find the Community Info on Reddit online, found just this post with some other people that also wasn't able to find in the reddit web. I've found it on mobile version, but there it is not possible to copy and paste. So after some searching I've found that when you change to reddit old version you get the Community Infob…
News about the dynamic, interpreted, interactive, object-oriented, extensible programming language Python
If you are about to ask a "how do I do this in python" question, please try r/learnpython, the Python discord, or the #python IRC channel on FreeNode.
Please don't use URL shorteners. Reddit filters them out, so your post or comment will be lost.
Posting code to this subreddit:
Add 4 extra spaces before each line of code
@wviana
wviana / gist:42ab291f6dbd1baeb5282057b2a3b4de
Created August 25, 2017 18:24
This is how to configura react-navigator header title color.
const AppNavigator = StackNavigator({
initialRouteName: {
screen: Login
},
Dashboard: {
screen: Dashboard,
},
}, {
navigationOptions: {
headerTitleStyle: {
'^(?:(?!.*(A ?4))).*[^T\d]((\d+) ?[xX] ?\d+[[:alpha:]]*\y).*$'::text AS nXm,
'^.*\y(CX[ c/]*(\d+)[^\d]*)\y.*$'::text AS CXn,
'^.*\y(CX(\d+)UN)\y.*$'::text AS CXnUN,
'^.*[^\d]((\d+) ?ROLOS).*$'::text AS nRolos,
'^.*(C/ ?(\d+) *UN).*$'::text AS CBarrAnUN,
'^.*[^\d]((\d+) ?UN).*$'::text AS nUN,
'^.*[^\d]((\d+)\/).*$'::text AS nBarra
package imc;
public class Paciente {
double peso; // atributos da classe paciente
double altura;
double metros;
public Paciente(double peso, double altura , double metros){// construtor da classe paciente
this.peso=peso;
Option Explicit
'Referência: http://stackoverflow.com/a/26474331/1864883
Private Sub MergeFiles()
Dim directory As String, fileName As String, sheet As Worksheet, total As Integer
Dim WrdArray() As String, currentFile As Workbook, thisFile As Workbook, output As Workbook, outputName As String
Application.ScreenUpdating = False
Application.DisplayAlerts = False
java.lang.NoSuchMethodException: android.support.v4.widget.CircleImageView.<init>(android.content.Context, android.util.AttributeSet)
at java.lang.Class.getConstructor0(Class.java:3082)
at java.lang.Class.getConstructor(Class.java:1825)
at org.jetbrains.android.uipreview.ViewLoader.createNewInstance(ViewLoader.java:396)
at org.jetbrains.android.uipreview.ViewLoader.loadClass(ViewLoader.java:172)
at org.jetbrains.android.uipreview.ViewLoader.loadView(ViewLoader.java:105)
at com.android.tools.idea.rendering.LayoutlibCallbackImpl.loadView(LayoutlibCallbackImpl.java:176)
at android.view.BridgeInflater.loadCustomView(BridgeInflater.java:247)
at android.view.BridgeInflater.createViewFromTag(BridgeInflater.java:171)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:727)
public void onBackPressed() {
if(detailsPanel.isHidden()) showFinishApplicationDialog();
else detailsPanel.stepBack();
}