Some of my cusomizations after installing Arch Linux.
View with-antd.js
/* eslint-disable no-param-reassign, consistent-return, no-restricted-syntax */ | |
// Source: https://github.com/solidzoro/next-plugin-antd-less (Adapted to Webpack 5) | |
const clone = require("clone"); | |
const fs = require("fs"); | |
const lessToJS = require("less-vars-to-js"); | |
// fix: prevents error when .less files are required by node | |
if (typeof require !== "undefined") require.extensions[".less"] = () => {}; | |
module.exports = ( |
View android_storage_ssh.md
References:
Steps
- Install Termux on android device.
- Find Termux username.
View AnkiCardTemplate.md
-
Install "Syntax Highlighting for Code" plugin: https://ankiweb.net/shared/info/1463041493
-
In the plugin's options (
Tools > Syntax Highlighting Options
), set:- Line numbers
- Center code fragments
- Use CSS classes
-
Enter following HTML and CSS templates in
Tools > Manage Note Types > Cards
View actlogger.sh
$ pacman -S xprintidle xdotool iw | |
$ while true; do idle=`xprintidle`; print `date` ' | ' 'Idle:' "$((idle/1000))s" ' | ' `xdotool getactivewindow getwindowname`; sleep 10; done | |
$ iw dev wlp2s0 info |
View iran_cities.json
[ | |
{ | |
"id": 1, | |
"province": "آذربایجان شرقی", | |
"cities": [ | |
{ | |
"name": "آبش احمد", | |
"phonetic": "Ābešahmad", | |
"longitude": "47.3171388", | |
"latitude": "39.04429447" |
View django-syslog.md
source: http://www.simonkrueger.com/2015/05/27/logging-django-apps-to-syslog.html
Django conf:
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'formatters': {
'verbose': {
'format': '%(levelname)s - [%(asctime)s] - %(name)s.%(funcName)s:%(lineno)s - %(message)s'
View install-arch.md
References:
- https://gist.github.com/mattiaslundberg/8620837
- https://wiki.archlinux.org/index.php/Installation_guide
http://www.muktware.io/arch-linux-guide-the-always-up-to-date-arch-linux-tutorial/
(Link is broken)
There are 2 choices:
- UEFI/GPT mode: UEFI boot mode / GPT partition table
- BIOS/MBR mode: Legacy boot mode / MBR partition table
I tried to install in UEFI mode, but my laptop (Acer E5-475-336H) had problems with it, and didn't boot after installation.
View queval.js
var jsep = require('jsep'); | |
(function (root) { | |
var COMPOUND = 'Compound', | |
IDENTIFIER = 'Identifier', | |
MEMBER_EXP = 'MemberExpression', | |
LITERAL = 'Literal', | |
THIS_EXP = 'ThisExpression', | |
CALL_EXP = 'CallExpression', |
View upvpn.sh
#!/bin/bash | |
VPN="Sharif ID" | |
trap "exit 0" SIGINT SIGTERM | |
while true; do | |
if ! nmcli con status | grep -q "$VPN"; then | |
echo "[`date`] Disconnected. Trying to reconnect..." | |
nmcli -p con up id "$VPN" |
NewerOlder