This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| import os | |
| import shlex | |
| import struct | |
| import platform | |
| import subprocess | |
| def get_terminal_size(): | |
| """ getTerminalSize() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- coding: utf-8 -*- | |
| # Print iterations progress | |
| def print_progress(iteration, total, prefix='', suffix='', decimals=1, bar_length=100): | |
| """ | |
| Call in a loop to create terminal progress bar | |
| @params: | |
| iteration - Required : current iteration (Int) | |
| total - Required : total iterations (Int) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # delete local tag '12345' | |
| git tag -d 12345 | |
| # delete remote tag '12345' (eg, GitHub version too) | |
| git push origin :refs/tags/12345 | |
| # alternative approach | |
| git push --delete origin tagName | |
| git tag -d tagName |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # The MIT License (MIT) | |
| # Copyright (c) 2016 Vladimir Ignatev | |
| # | |
| # Permission is hereby granted, free of charge, to any person obtaining | |
| # a copy of this software and associated documentation files (the "Software"), | |
| # to deal in the Software without restriction, including without limitation | |
| # the rights to use, copy, modify, merge, publish, distribute, sublicense, | |
| # and/or sell copies of the Software, and to permit persons to whom the Software | |
| # is furnished to do so, subject to the following conditions: | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { useState, useEffect } from 'react'; | |
| export const DateTime = () => { | |
| const [dateTime, setDateTime] = useState(new Date()); | |
| useEffect(() => { | |
| const id = setInterval(() => setDateTime(new Date()), 1000); | |
| return () => { | |
| clearInterval(id); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from "react"; | |
| import { StyleSheet, View } from "react-native"; | |
| const Card = (props) => { | |
| return <View style={[cardStyles.card, props.style]}>{props.children}</View>; | |
| }; | |
| export default Card; | |
| const cardStyles = StyleSheet.create({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cd ~ | |
| git clone https://github.com/facebook/watchman.git -b v4.9.0 --depth 1 | |
| cd watchman | |
| sudo apt-get install -y autoconf automake build-essential python2-dev libssl-dev libtool | |
| ./autogen.sh && ./configure --enable-lenient | |
| make && sudo make install | |
| watchman --version |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Android w/ x86 Emulator | |
| ## SETUP | |
| sudo -S apt-get update && sudo apt-get upgrade -y | |
| sudo -S apt-get install zip unzip wget git curl vim openjdk-8-jdk qemu-kvm -y | |
| sudo -S adduser $USER kvm | |
| mkdir -p Android/platforms | |
| wget https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip | |
| unzip sdk-tools-linux-4333796.zip -d Android/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Mi página web</title> | |
| </head> | |
| <body> | |
| <h1>Este es un ejemplo de tema oscuro con color naranja</h1> | |
| <p>¡Hola mundo! Este es un ejemplo de página web que utiliza una configuración de tema oscuro con el color naranja como color principal. Puedes usar esta configuración como base para tu propio sitio web y ajustarla a tus necesidades.</p> | |
| <button class="boton">Haz clic aquí</button> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| local M = { | |
| "neoclide/coc.nvim", | |
| branch = "master", | |
| build = "yarn install --frozen-lockfile", | |
| } | |
| M.config = function() | |
| -- Some servers have issues with backup files, see #649 | |
| vim.opt.backup = false | |
| vim.opt.writebackup = false |