sudo apt-get install -y apt-transport-https
sudo sh -c 'wget -qO- https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -'
sudo sh -c 'wget -qO- https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list'
sudo apt-get -y update
sudo apt-get install -y dart
This file contains 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
xfreerdp \ | |
+clipboard \ | |
+home-drive \ | |
+unmap-buttons \ | |
+async-channels \ | |
+auto-reconnect \ | |
-encryption \ | |
/sound:rate:44100,channel:2 \ | |
/kbd:0x00000409 \ | |
/bpp:16 \ |
This file contains 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/python | |
# -*- coding: utf-8 -*- | |
def xpath_soup(element): | |
# type: (typing.Union[bs4.element.Tag, bs4.element.NavigableString]) -> str | |
""" | |
Generate xpath from BeautifulSoup4 element. | |
:param element: BeautifulSoup4 element. | |
:type element: bs4.element.Tag or bs4.element.NavigableString |
This file contains 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
sudo vim $HOME/.bashrc | |
sudo vim $HOME/.zshrc | |
echo $HOME/development/flutter/bin | |
$HOME/development/flutter/bin | |
export PATH="$PATH:" |
This file contains 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
#!/bin/bash -x | |
# | |
# This script should only be used in ubuntu | |
function install_visual_studio_code { | |
sudo snap install code --classic | |
} | |
function install_oh_my_zsh { |
Ever wanted to delete all your likes/favorites from Twitter but only found broken/expensive tools? You are in the right place.
- Go to: https://twitter.com/{username}/likes
- Open the console and run the following JavaScript code:
setInterval(() => {
for (const d of document.querySelectorAll('div[data-testid="unlike"]')) {
d.click()
}
This file contains 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
#include <iostream> | |
#include <vector> | |
int main(void) { | |
// Create and init a vector | |
// 1. vector<int> variable; variable.push_back() | |
std::vector<int> lucky_numbers; | |
lucky_numbers.push_back(1); | |
lucky_numbers.push_back(100); | |
This file contains 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
// vector::push_back | |
#include <iostream> | |
#include <vector> | |
int main() | |
{ | |
vector<int> v1; | |
const vector<int> v2; | |
This file contains 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
// vector::push_back | |
#include <iostream> | |
#include <vector> | |
int main() | |
{ | |
std::vector<int> my_vector; | |
int my_int; | |
std::cout << "Please enter some integer (enter 0 to end): \n"; |
This file contains 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
#include <iostream> | |
#include <iostream> | |
using namespace std; | |
int main(void) | |
{ | |
// Initialize 2D array | |
char colour[4][10] = {"blue", "red", "organce", "yellow"}; |
NewerOlder