install packages first:
yay -S xl2tpd strongswan networkmanager-l2tpref: https://wiki.archlinux.org/index.php/Openswan_L2TP/IPsec_VPN_client_setup
| package main | |
| import ( | |
| "fmt" | |
| "net/http" | |
| "github.com/gocolly/colly" | |
| ) | |
| type MyCollector struct { |
| # References: | |
| # https://cmake.org/cmake/help/latest/command/add_custom_target.html | |
| # https://samthursfield.wordpress.com/2015/11/21/cmake-dependencies-between-targets-and-files-and-custom-commands/ | |
| # https://gist.github.com/socantre/7ee63133a0a3a08f3990 | |
| # https://stackoverflow.com/questions/24163778/how-to-add-custom-target-that-depends-on-make-install | |
| # https://stackoverflow.com/questions/30719275/add-custom-command-is-not-generating-a-target | |
| # https://stackoverflow.com/questions/26024235/how-to-call-a-cmake-function-from-add-custom-target-command | |
| # https://blog.csdn.net/gubenpeiyuan/article/details/51096777 | |
| cmake_minimum_required(VERSION 3.10) |
| # First you need to install gcalcli please go to https://github.com/insanum/gcalcli | |
| wg_next_event="#(gcalcli --military --nostarted agenda --nocolor | cut -d ' ' -f 2- | head -2 | tail -1 | cut -c1-40)" | |
| set -g status-right "#[fg=colour15,bg=colour237,bold]📅 $wg_next_event" |
| # vim:fileencoding=utf-8:ft=conf:foldmethod=marker | |
| #: Fonts {{{ | |
| #: kitty has very powerful font management. You can configure | |
| #: individual font faces and even specify special fonts for particular | |
| #: characters. | |
| # font_family Monaco | |
| font_family Source Code Pro |
| import os | |
| import gi | |
| gi.require_version("Gtk", "3.0") | |
| gi.require_version('WebKit2', '4.0') | |
| from gi.repository import Gtk, Gdk, WebKit2 | |
| class HtmlEditor(Gtk.Window): | |
| def __init__(self): | |
| super().__init__() | |
install packages first:
yay -S xl2tpd strongswan networkmanager-l2tpref: https://wiki.archlinux.org/index.php/Openswan_L2TP/IPsec_VPN_client_setup
| [morteza@ipo ~]$ python sample.py | |
| Traceback (most recent call last): | |
| File "sample.py", line 29, in <module> | |
| print(s[2].p()) | |
| File "sample.py", line 11, in p | |
| print(self.local.name) | |
| AttributeError: '_thread._local' object has no attribute 'name' | |
| [morteza@ipo ~]$ python sample.py | |
| Traceback (most recent call last): | |
| File "sample.py", line 29, in <module> |
| set nocompatible " be iMproved, required | |
| filetype off " required | |
| " set the runtime path to include Vundle and initialize | |
| set rtp+=~/.vim/bundle/Vundle.vim | |
| call vundle#begin() | |
| " alternatively, pass a path where Vundle should install plugins | |
| "call vundle#begin('~/some/path/here') | |
| " let Vundle manage Vundle, required |
| import time | |
| import threading | |
| from queue import Queue, Empty | |
| class Actor(object): | |
| """Basic event-based actor abstract.""" | |
| def __init__(self): | |
| """Initialize Actor class.""" | |
| self.inbox = Queue() |