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
#ifndef BASEN_HPP | |
#define BASEN_HPP | |
#include <algorithm> | |
#include <cassert> | |
#include <string> | |
#include <type_traits> | |
template<class T = int> | |
class BaseN { |
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 escript | |
main([Url]) -> | |
try | |
inets:start(), | |
ssl:start(), | |
{ok, {_, _, Body}} = httpc:request(get, {Url, []}, [{ssl, [{log_level, error}]}], []), | |
{Xml, _} = xmerl_scan:string(Body, [{encoding, "utf-8"}]), | |
[print(Node) || Node <- xmerl_xpath:string("//title/text()", Xml)] | |
catch |
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 json | |
import os | |
import sys | |
import urllib.request | |
user = sys.argv[1] | |
n=int(sys.argv[2]) if len(sys.argv) > 2 else -1 | |
url = f"https://api.github.com/users/{user}/gists" |
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
# -*- mode: sh; tab-width: 2; -*- | |
# Source code url. | |
readonly BASH_FUNCTIONS_URL='https://gist.githubusercontent.com/Lajule/1839331f43eabb9d38e1933f337e96bc/raw/.bash_functions' | |
####################################### | |
# Display banner for scripts. | |
# Arguments: | |
# Given script name. | |
# Given template (optional). |
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
filetype on | |
syntax on | |
set background=dark | |
set linebreak | |
set visualbell | |
set showmatch | |
set hlsearch | |
set autoindent | |
set expandtab | |
set shiftwidth=2 |
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
;;; package --- Summary | |
;;; Commentary: | |
;;; Code: | |
(defvar gnutls-algorithm-priority) | |
(setq inhibit-splash-screen t | |
visible-bell nil | |
ring-bell-function 'ignore | |
gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3") |
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
#!/bin/bash | |
set -ex | |
cwd="${PWD}" | |
for goos in darwin linux windows; do | |
for goarch in 386 amd64; do | |
(cd "${0%/*}" \ | |
&& GOOS="${goos}" GOARCH="${goarch} go build -o "${cwd}/${1}_${goos}_${goarch}") || exit $? |
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
iptables -F | |
iptables -X | |
iptables -t nat -F | |
iptables -t nat -X | |
iptables -t mangle -F |
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
# -*- mode: sh; tab-width: 2; -*- | |
# One letter aliases. | |
alias c='clear' | |
alias e='emacs -nw' | |
alias h='history' | |
alias j='jobs' | |
alias k='kill' | |
alias m='make -k' | |
alias q='exit' |
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
BINARY ?= tmp | |
VERSION := 0.0.1 | |
PACKAGE := github.com/Lajule/tmp | |
include go.mk |
OlderNewer