Search results
From wikinotes
- Netstat (category Pages using deprecated source tags)netstat shows TCP ports and their TCP-state. netstat -an # display netwk connections (listening, connected, etc) netstat -4 -f inet -n -r # display routing263 bytes (25 words) - 16:39, 3 July 2020
- Zsh antigen (category Pages using deprecated source tags)manager for zsh. pacaur -S antigen Plugins are declared within your ~/.zshrc. source /path/to/antigen.zsh antigen bundle zsh-users/zsh-autosuggestions antigen562 bytes (33 words) - 17:23, 8 November 2020
- Ruby irb (category Pages using deprecated source tags)ruby-irb # ~/.irbrc IRB.conf[:USE_SINGLELINE] = true # use 'readline' instead of multiline support irb irb --readline # uses readline, but disables multiline672 bytes (40 words) - 22:02, 17 May 2023
- Pftop (category Pages using deprecated source tags)tool like top, that monitors traffic through pf firewall. 1 # 2 # 3 # 4 # 5 # packets blocked for each rule f # filter (see below) filter syntax is very732 bytes (72 words) - 17:02, 1 July 2021
- Python setup.cfg (category Pages using deprecated source tags)Consolidates some python project dotfiles. Mostly superceeded by python pyproject.toml. [tool:pytest] python_files = *.py testpaths = tests norecursedirs737 bytes (21 words) - 15:07, 13 February 2021
- Readline (category Pages using deprecated source tags)Reads line from a terminal, executes them. Can be configured to use vi keybindings. set editing-mode vi set keymap vi # meta+(hjkl) jumps into normal mode869 bytes (90 words) - 23:14, 18 June 2020
- FreeBSD ifconfig (category Pages using deprecated source tags)FreeBSD uses ifconfig to manage network interfaces. manipulate interfaces within shell. # create/destroy a network interface of type 'tun' ifconfig tun1 KB (66 words) - 03:36, 7 August 2021
- Vim cli (category Pages using deprecated source tags)vim -p a b c # open in new tabs vim -o a b c # open in vert splits vim -O a b c # open in horiz splits vim --cmd "let foo=bar" --cmd "let bar=baz" # run824 bytes (92 words) - 18:38, 8 April 2023
- Php anatomy (category Pages using deprecated source tags)<?php class Automobile { def drive() { } }80 bytes (5 words) - 00:47, 9 July 2020
- Php comments (category Pages using deprecated source tags)/** Do something * * @param $name * @return string */ function get_hello_message($name) { // comment /* foo bar baz */ }180 bytes (15 words) - 01:21, 9 July 2020
- Gsudo (category Pages using deprecated source tags)sudo for windows! choco install -y gsudo271 bytes (7 words) - 02:08, 4 January 2021
- NvimPlugin: telescope (category Pages using deprecated source tags)Extendable search. Can be powered by fzf. :Telescope lsp_workspace_symbols query=Foo::Bar::Baz125 bytes (15 words) - 23:35, 23 February 2024
- Iftop (category Pages using deprecated source tags)S # display source port D # display destination port n # show IP instead of host name P # pause ? # display additional commands TX: transmitted RX: received360 bytes (24 words) - 21:34, 1 June 2018
- Gnu ps (category Pages using deprecated source tags)# show the environment for a PID at the time the process was started ps -xep ${PID}115 bytes (16 words) - 01:59, 1 September 2023
- Php print (category Pages using deprecated source tags)echo "some text\n"; pring "some text\n"; $animals = array("cat", "dog", "monkey"); print_r($animals);132 bytes (16 words) - 12:31, 9 July 2020
- Vim profiling (category Pages using deprecated source tags):profile start profile.log :profile func * :profile file * " At this point do slow actions :profile pause :noautocmd qall!152 bytes (18 words) - 00:26, 10 February 2024
- Linux ip (category Pages using deprecated source tags)The linux ip command is used to manage network interfaces on linux. ip addr # list network interfaces ip set wlp3s0 up # activate network interface203 bytes (24 words) - 20:02, 1 July 2020
- Linux iw (category Pages using deprecated source tags)iw is used to manage wireless internet connections from linux. iw wlp3s0 info # print wireless connection info iw wlp3s0 scan # scan for access points198 bytes (24 words) - 21:45, 1 July 2020
- Df (category Pages using deprecated source tags)df lists volume information, how much room is consumed, remaining, etc. df -h # print consumption, in human readable sizes206 bytes (19 words) - 13:49, 20 September 2020
- File (category Pages using deprecated source tags)file gives you information about the type of file. sudo file -s -L /dev/sdc1199 bytes (15 words) - 11:49, 9 June 2020
- Lsof (category Pages using deprecated source tags)lsof prints files that are currently open. lsof # list files belonging to active processes395 bytes (14 words) - 13:46, 20 September 2020
- Ntfs (category Pages using deprecated source tags)maximum characters Windows restricts paths to a max of 260 characters (with their bytestring path interface, unicode supports longer paths) Invalid filenames638 bytes (50 words) - 19:27, 12 February 2022
- Php composer (category Pages using deprecated source tags)dependency manager for php. brew install composer # [MacOS] not in macports cd project/ # dir with composer.json composer install # install deps322 bytes (21 words) - 13:35, 8 July 2020
- Host (category Pages using deprecated source tags)google.com # DNS query for google.com host google.com 8.8.8.8 # DNS query using 8.8.8.8 as nameserver271 bytes (35 words) - 01:09, 7 August 2021
- Coc-graphql (category Pages using deprecated source tags)" requirement Plug 'https://github.com/jparise/vim-graphql' :CocInstall coc-graphql Add a graphql-config to your project # ${project}/.graphqlrc # See:629 bytes (38 words) - 03:56, 11 February 2021
- Php exceptions (category Pages using deprecated source tags)throw new Exception("Division by zero"); try { // code that can throw exceptions } catch(Exception $e) { // code that runs when an exception is caught430 bytes (35 words) - 01:15, 9 July 2020
- Google chrome (category Pages using deprecated source tags)Settings > Keyboard: Shortcuts: App Shortcuts: - (All Applications) Close Tab: Ctrl+W # create - (Google Chrome) Select Next Tab: Ctrl+P # create - (Google586 bytes (28 words) - 00:04, 10 February 2024
- Python conditionals (category Pages using deprecated source tags)if var == 'no' : print "something" elif var == 'yes' : print "something else" else: print "something else entirely" You may find the all keyword useful:532 bytes (46 words) - 02:01, 14 February 2024
- Windows filesystem permissions (category Pages using deprecated source tags)TODO: I definitely have detailed notes on this somewhere.. TODO: Also record standardized locations with friendly permisisons (like for ssh keys) msg /server:wintermute436 bytes (49 words) - 22:59, 18 April 2021
- Ruby chruby (category Pages using deprecated source tags)rbenv. Consider using nix and direnv instead. cd yourproject/ echo "2.6.5" > .ruby-version # now when you enter directory, correct ruby is used automatically294 bytes (32 words) - 20:10, 14 August 2020
- Ruby rails: dates and times (category Pages using deprecated source tags)tzinfo = ActiveSupport::TimeZone.find_tzinfo("America/Toronto") timezone = ActiveSupport::TimeZone.new(tzinfo) Time.parse("1970-01-01T10:00:00Z").in_timezone(timezone)258 bytes (22 words) - 16:08, 7 February 2024
- Dtrace (category Pages using deprecated source tags)Watch/Count syscalls that a process makes. # dtrace is included in base system pkg install dtrace-toolkit # (optional) dtrace scripts kldload dtraceall927 bytes (44 words) - 19:48, 13 September 2020
- Freebsd vt (category Pages using deprecated source tags)Console Driver (tty) for FreeBSD, introduced as default in FreeBSD-12. # /boot/loader.conf vt.kern.vty = "sc" # enable syscons590 bytes (20 words) - 01:39, 8 February 2021
- Mycli (category Pages using deprecated source tags)mycli is an alternative mysql/mariadb/percona client built overtop of prompt_toolkit. pacaur -S mycli pip install mycli [main] multi_line = True key_bindings811 bytes (31 words) - 23:28, 17 December 2020
- Nmap (category Pages using deprecated source tags)nmap is a commandline port scanner. # don't use sudo. give your user permission to X nmap -sP '192.168.1.*' # scan all ips in addr range nmap 192.168.1637 bytes (59 words) - 01:01, 1 October 2020
- Bind-tools (category Pages using deprecated source tags)NOTE: see also dig # get BGP protocol ASN for facebook whois -h v4.whois.cymru.com " -v $(host facebook.com | grep "has address" | cut -d " " -f4)" | tail515 bytes (76 words) - 21:29, 11 October 2021
- Vim shell (category Pages using deprecated source tags)the commandline from vim's command mode. :w !sh " execute the current file using /bin/sh :w !less " pipe entire file to less :'<,'>!less " pipe visual-selection566 bytes (62 words) - 15:51, 10 February 2024
- Php fpm (category Pages using deprecated source tags)PHP fastcgi process manager. Can be configured to listen on a port or socket. Configure where php-fpm should listen # /usr/local/etc/php-fpm.d/www.conf766 bytes (82 words) - 18:33, 4 April 2021
- Coc-python (category Pages using deprecated source tags)NOTE: unmaintained, use coc-pyright instead python -m pip install jedi python -m pip install pylint :CocInstall coc-python " Interactive Choice :CocCommand927 bytes (41 words) - 00:43, 27 December 2021
- Ifuse (category Pages using deprecated source tags)interact with ios device filesystem on computer. sudo pacman -S libimobiledevice ifuse # unlock phone, plug into computer, and on iphone # 'trust' the817 bytes (74 words) - 19:52, 21 February 2021
- Ruby syntaxtree (category Pages using deprecated source tags)a very fast ruby ast node-types all defined within node.rb stree match /some/file.rb # generate matcher code stree search 'VarRef' /some/file.rb # search734 bytes (49 words) - 00:25, 1 February 2024
- Javascript debuggers (category Pages using deprecated source tags)commands to jump for next/step/continue like gdb. instead you have to use the UI, or use OS-specific hotkeys: super ' # next super ; # step super \ # continue737 bytes (64 words) - 20:42, 22 February 2024
- Vimdiff (category Pages using deprecated source tags)]c - advance to the next block with differences [c - reverse search for the previous block with differences do (diff obtain) - bring changes from the other847 bytes (104 words) - 21:12, 26 January 2021
- Zfs zdb (category Pages using deprecated source tags)man zdb https://www.unix.com/man-page/FreeBSD/8/zdb/901 bytes (70 words) - 01:11, 18 November 2020
- Korganizer (category Pages using deprecated source tags)-latest.exe It is very much a work in progress, at this stage you cannot use calendars at all. Settings > Configure Korganizer General > Calendars > Add1 KB (103 words) - 22:19, 8 February 2021
- Bat (category Pages using deprecated source tags)Bat is a syntax highlighted cat. bat file.graphql bat \ -l go `# syntaxhighlight for lang` \ --file-name 'my-file.go' `# set file title in result` \ --theme1 KB (72 words) - 21:54, 6 May 2023
- Ruby operators (category Pages using deprecated source tags)and or 1 == 1 1 != 0 1 <= 2 2 >= 1 'foo' =~ 'foobar' # 'foobar' contains 'foo' a ||= b # `a || a = b` (if a is not defined, a = b) obj_1 eql? obj_2 # if748 bytes (93 words) - 21:39, 17 April 2020
- Ruby iruby (category Pages using deprecated source tags)ruby. NOTE: It does not appear that iruby supports vi editing mode. I would use ruby pry instead, it has 1st-tier support. sudo pacman -S libffi libtool ruby516 bytes (50 words) - 15:15, 10 April 2020
- Ruby rubocop-ast (category Pages using deprecated source tags)nodes https://github.com/rubocop/rubocop-ast/blob/master/docs/modules/ROOT/pages/node_types.adoc Node Patterns (like AST selectors) https://docs.rubocop.938 bytes (58 words) - 00:22, 1 February 2024
- Coreutils dd (category Pages using deprecated source tags)on FreeBSD, you'll need to create a virtual block device # for the image using: # mdconfig -a -t vnode -f /path/to/image.img -u 0 # link image to virtual687 bytes (96 words) - 19:26, 28 March 2021
- Bottom (category Pages using deprecated source tags)Configurable/Cross-Platform commandline resource manager written in rust. Similar to gnu top. Has a vi mode. NOTE: neat, but graphs are CPU drains and903 bytes (55 words) - 13:56, 24 January 2021
- Xchm (category Pages using deprecated source tags)xchm file.chm44 bytes (3 words) - 23:06, 8 October 2018
- Kchmviewer (category Pages using deprecated source tags)kchmviewer file.chm50 bytes (3 words) - 23:06, 8 October 2018
- Xarchiver (category Pages using deprecated source tags)xarchiver is a GUI program to manage various archive formats sudo pacman -S xarchiver117 bytes (14 words) - 14:54, 25 May 2019
- Osascript (category Pages using deprecated source tags)Applescript osascript -e 'display notification "nice text" with title "nice title"'133 bytes (11 words) - 16:13, 8 August 2020
- Wipe (category Pages using deprecated source tags)Deletes files within a filesystem. I haven't had the occasion to use it yet. wipe -r /path/to/wipe130 bytes (19 words) - 19:43, 3 August 2019
- Cbsd install (category Pages using deprecated source tags)pkg install cbsd47 bytes (3 words) - 20:44, 7 June 2020
- Latex comments (category Pages using deprecated source tags)% a comment43 bytes (2 words) - 15:13, 10 July 2021
- Aria2 (category Pages using deprecated source tags)sudo pacman -S aria2 aria2c file.torrent # start a torrent download224 bytes (11 words) - 16:27, 11 July 2019
- Elisp math (category Pages using deprecated source tags)(+ 3 4) ;; adds 3 and 455 bytes (6 words) - 18:54, 11 January 2020
- Elisp comments (category Pages using deprecated source tags);; comments begin with double-semicolons71 bytes (5 words) - 18:34, 11 January 2020
- Nix conditionals (category Pages using deprecated source tags)if true then "true" else "false"62 bytes (6 words) - 01:00, 16 August 2020
- Google docs (category Pages using deprecated source tags)Tools --> Preferences --> Automatically detect Markdown87 bytes (5 words) - 13:33, 6 April 2023
- Icsharp (category Pages using deprecated source tags)NOTE: Did not work for me sudo pacman -S mono git clone https://github.com/zabirauf/icsharp cd icsharp xbuild202 bytes (20 words) - 21:06, 2 November 2019
- Javascript comments (category Pages using deprecated source tags)/* Multiline * comment */ let foo = 1 // comment90 bytes (6 words) - 17:42, 23 May 2021
- Ruby comments (category Pages using deprecated source tags)# line comment63 bytes (2 words) - 20:14, 5 December 2019
- Notify-send (category Pages using deprecated source tags)Issue a notification from the commandline on a linux/bsd server. notify-send SUMMARY BODY121 bytes (15 words) - 16:09, 8 August 2020
- Zip (category Pages using deprecated source tags)requests a password, encryption algorithm varies` verify encryption algorithm used 7z l -slt file.zip332 bytes (31 words) - 19:29, 13 August 2022
- Ruby json (category Pages using deprecated source tags)require 'json' {"a" => "b"}.to_json #> '{"a": "b"}' JSON.parse('{"a": 1}') #> { "a" => 1 }124 bytes (14 words) - 20:18, 6 November 2020
- Vbscript functions (category Pages using deprecated source tags)Sub mysub(argument1,argument2) some statements End Sub86 bytes (8 words) - 00:18, 8 December 2019
- Powershell datetime (category Pages using deprecated source tags)Get-Date Get-TimeZone Set-TimeZone 'Eastern Standard Time'95 bytes (9 words) - 13:38, 9 August 2019
- Qutebrowser install (category Pages using deprecated source tags)sudo pacman -S qutebrowser # archlinux choco install -y qutebrowser # windows brew cask install qutebrowser # macos153 bytes (15 words) - 17:12, 15 May 2021
- Unrar (category Pages using deprecated source tags)Compress/Extract rar archives. # extract, preserving directory structure unrar x src.rar /path/out/182 bytes (14 words) - 03:18, 2 July 2022
- Coreutils chown (category Pages using deprecated source tags)Change the user/group that owns a file. chown user:group file121 bytes (11 words) - 19:25, 28 March 2021
- Pulseaudio install (category Pages using deprecated source tags)sudo pacman -S pulseaudio pulseaudio-alsa sudo pacman -S pavucontrol-qt102 bytes (11 words) - 00:33, 26 March 2021
- Java logging (category Pages using deprecated source tags)TODO: UNFINISHED! import java.util.logging.Logger; import java.util.logging.*;117 bytes (11 words) - 19:47, 2 November 2019
- Nullfs (category Pages using deprecated source tags)Mount directories as other directories. mount -t nullfs /mnt/mywebsite /usr/local/www/mywebsite178 bytes (14 words) - 18:47, 1 May 2021
- Powershell registry (category Pages using deprecated source tags)Set-ItemProperty -Path 'Registry::HKCU\Environment' -Name PATH -Value ($PATH.Path +";"+ $rezbin_PATH)138 bytes (13 words) - 12:22, 6 August 2019
- Bsd jot (category Pages using deprecated source tags)jot -r 1 1 50 # 1 random num between 1 and 5078 bytes (12 words) - 19:48, 28 March 2021
- Wireguard usage (category Pages using deprecated source tags)wg # print configured connections wg show # print configured connections wg-quick up wg0 # activate wg0158 bytes (15 words) - 03:14, 4 July 2020
- Viml comments (category Pages using deprecated source tags)Lines matching '\s*"' are comments. " a comment " another comment113 bytes (9 words) - 19:09, 10 May 2019
- Exfat (category Pages using deprecated source tags)FreeBSD # requires port: sysutils/fusefs-exfat # NOTE: I was unable to compile (2020/05) mount -t exfat /dev/ad1s1 /mnt273 bytes (20 words) - 21:02, 14 June 2020
- Launchd (category Pages using deprecated source tags)commandline launchctl -h353 bytes (3 words) - 23:51, 15 September 2021
- Gnu ls (category Pages using deprecated source tags)ls --group-directories-first ls -X # sort by file-extension ls -v # sort with natural sorting176 bytes (16 words) - 01:30, 25 May 2021
- Elisp print (category Pages using deprecated source tags)(message "her name is %s, her age is %d" (list "vickie" 24) ) ;; print with substitution (print "abc") ;; normal print199 bytes (19 words) - 18:38, 11 January 2020
- Yum (category Pages using deprecated source tags)CentOS uses a the rpm based package manager YUM. yum search <package> # search for a package yum install <package> # install package yum update # update305 bytes (37 words) - 14:04, 14 March 2021
- Nix operators (category Pages using deprecated source tags)Full list https://nixos.org/nix/manual/#sec-language-operators 1 + 1 # addition 1 - 1 # subtraction 1 * 1 # multiplication 1 / 1 # division175 bytes (22 words) - 02:20, 16 August 2020
- Rpcs3 (category Pages using deprecated source tags)RPCS3 is a playstation 3 emulator. pacaur -S cereal pacaur -S rpcs3-git158 bytes (13 words) - 16:51, 21 May 2018
- Vbscript variables (category Pages using deprecated source tags)Dim var ' Normal variable within scope Public var ' Global variable Private var ' (? private to what)154 bytes (15 words) - 00:09, 8 December 2019
- Powershell debugger (category Pages using deprecated source tags)Set-PSBreakpoint # set breakpoint on current line Set-PSBreakpoint -Line 15 # set breakpoint on line 15190 bytes (16 words) - 00:16, 26 November 2019
- Anbox (category Pages using deprecated source tags)Anbox is an android emulator for linux. pacman -S anbox142 bytes (10 words) - 02:30, 8 February 2021
- Ijava (category Pages using deprecated source tags)sudo pacman -S jupyter pacaur -S jre pacaur -S jdk11 git clone https://github.com/SpencerPark/IJava.git cd IJava/ sudo chmod u+w gradlew ./gradlew installKernel276 bytes (31 words) - 16:27, 8 June 2019
- Cmake operators (category Pages using deprecated source tags)IF( <expr> AND <expr> ) IF( <expr> OR <expr> ) https://cmake.org/cmake/help/v3.11/command/if.html130 bytes (18 words) - 18:58, 18 May 2018
- Powershell conditionals (category Pages using deprecated source tags)if ($PATH[0] -ne 'C:\Python27') { ... } # if statement if (!( $PATH.Contains('C:\Python27') )){ ... } # if not statement178 bytes (16 words) - 03:26, 19 September 2018
- Csv (category Pages using deprecated source tags)CSVs are comma separated tables. headers are available, but not mandatory. entries may include commas if the row/column is written within double-quotes356 bytes (43 words) - 16:53, 20 January 2021
- Dia (category Pages using deprecated source tags)A UML or general node-based diagram tool. sudo pacman -S dia106 bytes (12 words) - 00:06, 30 August 2018
- Ruby yaml (category Pages using deprecated source tags)require 'yaml' YAML.load("a: 1", aliases: true) #> {"a"=>1} YAML.dump(['a', ['b']], indentation: 2)132 bytes (16 words) - 20:46, 19 September 2022
- Python install (category Pages using deprecated source tags)pacman -S python # Archlinux pkg install python37 # FreeBSD brew install python # MacOS178 bytes (12 words) - 16:41, 10 July 2021
- Ini (category Pages using deprecated source tags)values can be put in sections sections cannot be nested '=' or ':' may be used interchangeably [section a] key_1 = value1 key_2 = value2 [section b] key_3276 bytes (40 words) - 13:17, 5 April 2019
- Python ctypes (category Pages using deprecated source tags)import ctypes #returns kernel ctypes.windll.kernel32110 bytes (7 words) - 20:45, 6 May 2018
- Ruby parser (category Pages using deprecated source tags)An AST parser for ruby, in ruby https://github.com/whitequark/parser ruby-parse -e 'puts "hello"' (send nil :puts (str "hello"))178 bytes (22 words) - 14:20, 26 July 2023
- Ruby filesystem (category Pages using deprecated source tags)Dir.mktmpdir("some_prefix_") do |dirpath| # ... end Tempfile.create("some_prefix_") do |fd| fd.write("hello") end208 bytes (17 words) - 19:06, 25 July 2023
- Baikal backups (category Pages using deprecated source tags)# keep copy of dir tar -cvf baikal_data.tar /usr/local/www/baikal/Specific # extract into new install133 bytes (18 words) - 17:39, 14 August 2022
- Batch datatypes (category Pages using deprecated source tags)REM note the abscence of quotes around string set YOURVAR=Your Value echo %YOURVAR%170 bytes (14 words) - 16:05, 10 July 2021
- Batch operators (category Pages using deprecated source tags)== # equals LEQ # <= GEQ # >= LSS # < GTR # > EQU # == NEQ # != if ("%var%" LEQ "3") { echo %var% is less than 3 }182 bytes (17 words) - 16:12, 10 July 2021
- Gnu vmstat (category Pages using deprecated source tags)vmstat shows info about processes, memory, paging, io, and cpu activity. vmstat 5 # run vmstat once every 5s141 bytes (18 words) - 14:49, 28 August 2020
- Python sorting (category Pages using deprecated source tags)foo = sorted(['z', 'b', 'a']) # new copy sort(mylist) # mutates 'mylist' sorted(mylist, key=lambda x: x % 2) # sort by result of 'key'188 bytes (23 words) - 16:11, 6 February 2021
- Macos screencapture (category Pages using deprecated source tags)cli screen capture tool, preinstalled with macos. screencapture -s -T 5 out.png # select region, wait 5s, then capture selection161 bytes (20 words) - 14:50, 19 March 2021
- Redis-cli (category Pages using deprecated source tags)redis-cli -h domain.com # connect to redis on cli redis-cli -h domain.com FLUSHALL # execute 'FLUSHALL' and exit154 bytes (20 words) - 20:26, 17 April 2021
- Python resource (category Pages using deprecated source tags)bulitin lib to examine/modify resources used by current program. Example import resource resource.getrusage(resource.RUSAGE_SELF).ru_maxrss173 bytes (20 words) - 13:40, 22 August 2020
- Elisp (category Pages using deprecated source tags)Alt-x, ielm ;; lisp interpreter477 bytes (5 words) - 18:53, 11 January 2020
- Deluge (category Pages using deprecated source tags)sudo pacman -S deluge-gtk # deluge is daemon only Edit > Preferences: Network: Encryption: Inbound: Required Outbound: Required Level: Full Stream531 bytes (20 words) - 22:50, 27 December 2020
- Python thread (category Pages using deprecated source tags)The oldest threading interface for python. import thread thread.start_new_thread(func, ('argA',), {'kwargA': 1}) lock = thread.allocate_lock() lock.acquire()210 bytes (24 words) - 17:24, 15 February 2019
- Python redis (category Pages using deprecated source tags)redis client for python import redis conn = redis.Redis(host='foo.bar.com', port=, password='password') conn.set('foo', 'bar') conn.get('foo') # >>> 'bar'189 bytes (24 words) - 19:16, 17 April 2021
- Python passlib (category Pages using deprecated source tags)from passlib.hash import sha512_crypt sha512_crypt.hash('password')218 bytes (10 words) - 12:18, 25 April 2019
- Php operators (category Pages using deprecated source tags)$var === NULL // is instance $var !== NULL // is not instance $var = 1 // equal $var != 1 // not equal $var .= "bar" // append to string $var += 1; //203 bytes (25 words) - 23:56, 9 July 2020
- Php classes (category Pages using deprecated source tags)php classes are very similar to java, right down to extends and implements. class Foo { /** string */ private name; public function __constructor() { $this->name343 bytes (31 words) - 00:10, 10 July 2020
- Xquartz (category Pages using deprecated source tags)X11 server for MacOS. Download http://xquartz.macosforge.org/landing/ # Do not start xterm on xquartz start defaults write org.macosforge.xquartz.X11 \336 bytes (29 words) - 03:31, 25 November 2019
- Python bcrypt (category Pages using deprecated source tags)import bcrypt hashed_pw = bcrypt.hashpw('password'.encode('utf-8'), bcrypt.gensalt()) if bcrypt.checkpw(password.encode('utf-8'), hashed_pw): print('password206 bytes (25 words) - 18:14, 20 March 2019
- Shred (category Pages using deprecated source tags)Deletes files off a disk. Should do this before disposing of work HDDs, or before recycling dad's old work computers. Does not necessarily work for most307 bytes (44 words) - 00:18, 18 October 2020
- Powershell filesystem (category Pages using deprecated source tags)if (Test-Path -Path "$src_dir") # check if path exists New-Item "$src_dir" -ItemType Directory # create directory Remove-Item -Recurse -Force some_dir237 bytes (27 words) - 12:23, 6 August 2019
- Pkg add (category Pages using deprecated source tags)OpenBSD's package manager. #install sudo pkg_add -r <package> #delete pkg_info | grep <package> sudo pkg_delete <package-version.number> #search sudo pkg_search204 bytes (25 words) - 14:02, 14 March 2021
- Batch conditionals (category Pages using deprecated source tags)IF [%VARIABLE%]==[] ( echo Variable is not set ) ELSE IF [%VARIABLE]==[blah]( echo some condition ) ELSE ( echo Value Found )182 bytes (18 words) - 00:19, 12 October 2018
- Lightdm (category Pages using deprecated source tags)sudo pacman -S lightdm lightdm-gtk-greeter sudo systemctl enable lightdm533 bytes (11 words) - 14:10, 3 October 2019
- Python-digitalocean install (category Pages using deprecated source tags)pacman -S python-digitalocean # Arch pip install python-digitalocean # Other111 bytes (10 words) - 15:42, 26 July 2020
- Vmware (category Pages using deprecated source tags)desktop_end_user_computing/vmware_workstation_player/15_0 When prompted, use /etc/systemd for system service scripts directory426 bytes (45 words) - 16:50, 16 June 2019
- Python crypt (category Pages using deprecated source tags)encrypts strings using the OS's crypt.c. only available on unix-like systems. import crypt # use strongest available crypt.crypt('password') # use specific algorithm281 bytes (35 words) - 00:54, 21 March 2021
- Nload (category Pages using deprecated source tags)nload samples badwidth usage over a network interface. sudo pacman -S nload sudo nload # left/right switch network interface being monitored311 bytes (21 words) - 18:06, 23 December 2020
- Ascii sector (category Pages using deprecated source tags)Wing-Commander privateer clone buitl out of ascii characters. It is amazing to me that this works as a game, it is even beautiful. Install: pacaur -S asciisec215 bytes (33 words) - 04:59, 8 March 2019
- Python timeit (category Pages using deprecated source tags)Timer('t=a; a=b; b=t', 'a=1; b=2').timeit() #> 0.088729 time python2 lute.py ## use bash to simply time how long the script takes to run.202 bytes (34 words) - 20:04, 6 May 2018
- FBReader (category Pages using deprecated source tags)fbreader is a cross platform ebook reader. Apparently, quite customizable. sudo pacman -S fbreader FBReader file.epub287 bytes (17 words) - 17:38, 18 January 2019
- Showkey (category Pages using deprecated source tags)showkey displays keycodes produced by keypresses within a linux TTY. showkey --keycodes showkey --scancodes showkey -a # type ascii codes221 bytes (19 words) - 15:34, 27 September 2020
- Postgresql usage (category Pages using deprecated source tags)sudo -u postgres pg_dumpall > backup.pgsql sudo -u postgres psql < backup.pgsql351 bytes (13 words) - 13:08, 15 September 2019
- Texworks (category Pages using deprecated source tags)A side-by-side tex/preview editor. pacman -S texlive # archlinux texlive390 bytes (12 words) - 15:43, 10 July 2021
- Python loops (category Pages using deprecated source tags)var = [1,2,3] for i in range(0, len(var)): print var[i] else: print "completed successfully without break statement" padding = 0 while padding < 6 : padding273 bytes (26 words) - 17:40, 6 May 2018
- Npx (category Pages using deprecated source tags)Run npm installed executables. npx ${EXECUTABLE} ${ARGS[@]}485 bytes (7 words) - 18:39, 4 July 2021
- Python resampy (category Pages using deprecated source tags)import numpy import resampy numpy.frombuffer(raw_wav_str, sr_orig=44100, sr_new=16000)325 bytes (15 words) - 21:27, 7 September 2019
- Ruby datetimes (category Pages using deprecated source tags)TODO: sort out what is activesupport extensions Time.parse("Wed Oct 11 13:49:06 2023 -0700") Date.parse("Wed Oct 11 13:49:06 2023 -0700") time.in_time_zone213 bytes (34 words) - 14:51, 25 October 2023
- Vscode plugin: python (category Pages using deprecated source tags)code --install-plugin ms-python.python sudo pip install rope146 bytes (10 words) - 19:25, 2 November 2019
- Python flask-restful (category Pages using deprecated source tags)Like argparse for API routes curl 'http://api/user' -d 'name=will' -d 'age=30+'112 bytes (15 words) - 20:49, 23 July 2019
- Mkinitcpio (category Pages using deprecated source tags)Configure linux boot ram disk. # regenerate mkinitcpio -p ${kernel-name} # ex: linux, linux-lts # temporarily load kernel module modprobe $KERNEL_MODULE427 bytes (21 words) - 13:54, 4 April 2021
- Statsd (category Pages using deprecated source tags)statsd is a daemon for stats aggregation. # <metricname>:<value>|<type> echo "foo:1|c" | nc -u -w0 127.0.0.1 8125330 bytes (22 words) - 20:00, 23 April 2020
- Powershell interpreter (category Pages using deprecated source tags)set-location # cd clear-host # clear copy-item # cp rename-item # remove-item # rm get-childitem write-output ... | select-string -pattern '.*' # grep277 bytes (22 words) - 12:27, 9 August 2019
- Batch streams (category Pages using deprecated source tags)REM replace file echo "test" > C:/test.txt REM append file echo "test" >> C:/test.txt REM redirect stdout/stderr DIR SomeFile.txt 2>&1187 bytes (25 words) - 01:24, 12 October 2018
- Nftables install (category Pages using deprecated source tags)NOTE: nftables is not a daemon. it applies settings and exits # nftables sudo pacman -S nftables sudo systemctl enable nftables # for logging sudo pacman250 bytes (30 words) - 14:53, 13 March 2022
- Latex install (category Pages using deprecated source tags)pacman -S texlive-bin texlive-core # archlinux Since tex is plaintext, you can use anything you'd like to edit it.342 bytes (20 words) - 15:41, 10 July 2021
- Ncpamixer (category Pages using deprecated source tags)tui puleaudio control (duplicates pavucontrol-qt in console) pacaur -S ncpamixer F1 - F5 # each tab (playback, recording, output devices, ...) h/l # volume339 bytes (24 words) - 23:20, 17 May 2021
- Ffmpeg record window (category Pages using deprecated source tags)ffmpeg -f gdigrab -framerate 30 -i title="german.avi - VLC media player" -b:v 3M germ.flv121 bytes (16 words) - 13:28, 1 June 2018
- Viml modes (category Pages using deprecated source tags)call feedkeys(":abc def")132 bytes (4 words) - 17:41, 10 May 2019
- Vader.vim assertions (category Pages using deprecated source tags)Assert 1, 'message' " assert boolean is true AssertEqual 'expected', 'result' " assert equals AssertNotEqual 'a', 'b' AssertThrows178 bytes (16 words) - 18:28, 19 July 2019
- Auditctl (category Pages using deprecated source tags)Audit the linux kernel behaviour. auditctl -A exit,always -S connect # install log auditctl -d exit,always -S connect # uninstall log252 bytes (21 words) - 14:14, 24 May 2020
- Znc install (category Pages using deprecated source tags)sudo pkg install znc # FreeBSD sudo pacman -S znc # Archlinux The first time you run the service, you will be prompted to generate SSL certs. Do it. Connect232 bytes (33 words) - 19:56, 25 April 2020
- Cmake unix (category Pages using deprecated source tags)cd $your_project/build cmake .. # generate makefile make # compile project sudo make install # install compiled project (as super-user, so have write permissions323 bytes (26 words) - 18:14, 18 May 2018
- Cmake conditionals (category Pages using deprecated source tags)IF(<expr>) ELSEIF(<expr>) ELSE(<expr>) ENDIF(<expr>) # ======= # Example # ======= IF( 1 EQUALS 2 ) MESSAGE( "1 is equal to 2" ) ENDIF( 1 EQUALS 2 ) See235 bytes (27 words) - 18:57, 18 May 2018
- Cmake expressions (category Pages using deprecated source tags)IF( 1 EQUALS 4 ) IF( 1 GREATER 4 ) If( 1 LESS 4 ) If( DEFINED ) If( IS_DIRECTORY ${path} ) If( IS_SYMLINK ${path} ) https://cmake.org/cmake/help/v3.11/command/if201 bytes (32 words) - 18:56, 18 May 2018
- Mutt msmtp (category Pages using deprecated source tags)Documents using msmtp to send emails for mutt. set sendmail = "/usr/bin/msmtp -a <account>"194 bytes (15 words) - 22:31, 1 January 2021
- Python setuptools: executables (category Pages using deprecated source tags)You can instruct setuptools to install executables on your PATH using entry_points. setup( ... entry_points = { 'console_scripts': ['funniest-joke=funniest256 bytes (23 words) - 17:47, 7 August 2020
- Elisp conditionals (category Pages using deprecated source tags);; test same datatype/value (if (equal "abc" "abc") (print "equal!") ;; if true (print "not equal!" ) ;; if false ) ;; if list equal (equal '(3 4 5) '(3325 bytes (36 words) - 18:52, 11 January 2020
- Ruby jekyll install (category Pages using deprecated source tags)Install ruby bundler and gem install jekyll. gem update gem install jekyll235 bytes (12 words) - 01:07, 28 February 2021
- VimPlugin: Tabular (category Pages using deprecated source tags):Tab /= "align all = signs :Tab /=\zs "align everything after the = sign :Tab /=/l0r1 "define spacing on left/right of matched char NOTE: author also describes332 bytes (38 words) - 19:39, 30 March 2019
- Spidermonkey (category Pages using deprecated source tags)Firefox's javascript engine. Includes an interpreter. pacaur -S spidermonkey js file.js493 bytes (12 words) - 12:20, 6 June 2021
- Cpp inheritance (category Pages using deprecated source tags)// header class MyClass: public MyParent { public: MyClass (int, int); void new_method (); }; // re-implement constructor // 1. duplicate interface //429 bytes (39 words) - 02:56, 17 November 2018
- Inotify (category Pages using deprecated source tags)inotify is a program that monitors a directory for new or changed files. sudo pacman -S inotify-tools189 bytes (18 words) - 02:11, 14 May 2021
- Archlinux troubleshooting (category Pages using deprecated source tags)sudo update-ca-trust105 bytes (4 words) - 22:25, 1 October 2020
- Php namespaces (category Pages using deprecated source tags)php namespace Foo\Bar; class Baz { // ... } # /src/package/foo/bar/zab.php use Foo\Bar; new Bar\Baz()318 bytes (41 words) - 23:41, 9 July 2020
- Batch registry (category Pages using deprecated source tags)REM query registry key reg query "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v AllowRemoteRPC REM set/modify registry key reg add "HKLM\S321 bytes (35 words) - 16:23, 10 July 2021
- Samba install (category Pages using deprecated source tags)sudo pacman -S samba sudo systemctl enable samba.service # sudo systemctl enable smb.service # sudo systemctl enable nmb.service sudo pkg install samba413419 bytes (35 words) - 16:30, 1 July 2021
- Csharp build systems (category Pages using deprecated source tags)yourproject.csproj <Project Sdk="Microsoft.NET.Sdk"> <!-- ...project config... --> <ItemGroup> <PackageReference Include="Newtonsoft.Json" Version="9.0322 bytes (21 words) - 03:29, 3 November 2019
- Wireguard install (category Pages using deprecated source tags)sudo pacman -S wireguard-tools #sudo pacman -S wireguard-dkms # built into linux kernel >5.6 pkg install wireguard # /etc/rc.conf gateway_enable="YES"483 bytes (37 words) - 21:40, 19 June 2021
- Amazon (category Pages using deprecated source tags)firefox: Settings > Preferences: General: - [x] Play DRM controlled Content google-chrome: ?? High Def videos: # see https://www.maketecheasier.com/wa457 bytes (38 words) - 20:17, 21 February 2021
- Winetricks (category Pages using deprecated source tags)Install windows fonts and DLLs in wine. winetricks list # list install categories winetricks ${CATEGORY} list # list available installs from a category444 bytes (25 words) - 14:27, 23 May 2021
- Powershell services (category Pages using deprecated source tags)get-service # list all services get-service | get-member # list all properties of service objects get-service <service> # get target service object get-service482 bytes (42 words) - 20:54, 8 August 2019
- Java comments (category Pages using deprecated source tags)There are 3x types of comments in java. // inline comment /* multiline comment */ In java, docstrings are written above the item being documented. /**420 bytes (41 words) - 16:13, 9 February 2019
- Fzy (category Pages using deprecated source tags)A commandline fuzzy matcher. Not as featureful as fzf. find | fzy # interactive fuzzy search find | fzy --show-matches='foo' # non-interactive descending423 bytes (24 words) - 14:31, 27 February 2022
- Tt-rss upgrades (category Pages using deprecated source tags)Important note: after an upgrade, you have to set SINGLE_USER_MODE to true in your config.php; remember to modify after that if needed.167 bytes (25 words) - 01:44, 4 April 2021
- Gawk conditionals (category Pages using deprecated source tags)if ( var >= 10 ) { print "var is larger than or equal to 10"; } else if ( var <= 5 ) { print "var is smaller than or equal to 5"; } else { print "all other273 bytes (30 words) - 01:20, 19 July 2021
- pkg install nginx # FreeBSD pacman -S nginx # Archlinux You may need to compile for newer or disabled features. I don't recall when I needed this.350 bytes (25 words) - 22:06, 21 March 2021
- Pacman troubleshooting (category Pages using deprecated source tags)package's file, and re-install using force. sudo rm -rf /var/lib/pacman/local/man-pages-* sudo pacman -S --force man-pages301 bytes (30 words) - 18:36, 25 December 2021
- Ruby nokigiri (category Pages using deprecated source tags)nokigiri is an html parser require 'nokigiri' html = '<html><title>foo</title></html>' doc = Nokigiri::HTML.parse(html) doc.css("title") # css-select elements316 bytes (24 words) - 20:01, 14 September 2021
- Ntop (category Pages using deprecated source tags)A web ui for network traffic introspection. graphs, stats, etc. sudo pacman -S ntop sudo ntop -i enp0s25 # visit: localhost:3000432 bytes (21 words) - 20:05, 23 December 2020
- Nix variables (category Pages using deprecated source tags)var = "value" # assign variable (global) # under 'let' variables are local to current scope let local_var = "value" other_var = "value" 'with' exposes342 bytes (44 words) - 22:39, 5 August 2021
- Bitlbee discord: install (category Pages using deprecated source tags)pacaur -S bitlbee-discord sudo pkg install autoconf sudo pkg install autotools cd /usr/ports/irc/bitlbee-discord make sudo make install227 bytes (22 words) - 02:18, 21 January 2022
- Vbscript input/output (category Pages using deprecated source tags)Set fso = CreateObject ("Scripting.FileSystemObject") Set stdout = fso.GetStandardStream (1) Set stderr = fso.GetStandardStream (2) stdout.WriteLine "print244 bytes (25 words) - 00:23, 8 December 2019
- Postgresql install (category Pages using deprecated source tags)sudo pkg install postgresql96-server echo "postgresql_enable=\"YES\"" >> /etc/rc.conf sudo service postgresql initdb sudo service postgresql start WARNING:559 bytes (45 words) - 13:00, 15 September 2019
- Batch hardware (category Pages using deprecated source tags)wmic cpu wmic memcache get access # overall cpu usage typeperf "\Processor(_Total)\% Processor Time" # individual cpu usage typeperf "\Processor{*)\% Processor555 bytes (36 words) - 16:25, 10 July 2021
- 7zip (category Pages using deprecated source tags)7zip is a commandline/gui program to manage various archive formats. pacman -S p7zip # archlinux 7z x -o/path/out/ file.7z # extract to dir311 bytes (25 words) - 20:39, 13 November 2021
- Python lowlevel (category Pages using deprecated source tags)WARNING: Kills python process if there is an error. (including maya). import ctypes memoryLoc = id( MyClassInstance ) ## Get Memory Location ref2Class392 bytes (32 words) - 17:28, 6 May 2018
- Docker-compose usage (category Pages using deprecated source tags)docker-compose up # runs command for each server in 'docker-compose.yml' docker-compose build # builds environment from 'docker-compose.yml' docker-compose264 bytes (32 words) - 21:22, 18 April 2020
- Kobo eReader (2010) (category Pages using deprecated source tags)It's pretty straightforwards, just plug it in and mount it like a normal disk. sudo mount /dev/sdb /mnt/usb cp somebook.pdf /mnt/usb234 bytes (25 words) - 16:12, 19 September 2021
- Light (category Pages using deprecated source tags)light allows you to control your backlight brightness. sudo pacman -S light usermod -a -G video will # add your user to group 'video' light -S 100 # set425 bytes (41 words) - 11:49, 14 September 2019
- Dunst usage (category Pages using deprecated source tags)# send notification notify-send 'my title' 'my message' # repeat last message # (repeated calls navigate further back in history) dunstctl history-pop499 bytes (42 words) - 23:13, 6 August 2021
- Nix libraries (category Pages using deprecated source tags)pkgs.lib.makeLibraryPath [ pkgs.zlib ] # path from lib/ dirs "${pkgs.shared-mime-info}/share/mime/packages/freedesktop.org.xml" # pkg interpolated is the461 bytes (36 words) - 02:17, 27 March 2021
- Fsck (category Pages using deprecated source tags)Check for filesystem errors, and try to repair them. Similar to mount, fsck has different tools for different filesystems. For example fsck.btrfs, fsck350 bytes (40 words) - 02:09, 9 May 2021
- Ruby concurrency (category Pages using deprecated source tags)def func1 i = 0 while i<=2 puts "func1 at: #{Time.now}" sleep(2) i = i+1 end end thread = Thread.new{func1()} thread.join()395 bytes (25 words) - 19:25, 17 February 2020
- Ruby debuggers (category Pages using deprecated source tags)Builtin debugger module. See ruby debug. ruby -r debug yourmodule.rb A ruby interpreter, and debugger rolled into one. External library. See ruby pry.415 bytes (33 words) - 15:56, 29 March 2020
- Mutt khard (category Pages using deprecated source tags)~/.mutt/muttrc set query_command= "khard email --parsable %s" macro index,pager a "<pipe-message>khard add-email<return>" \ "Add sender to contacts (khard)"315 bytes (30 words) - 17:10, 29 December 2020
- Nginx allowlist or denylist (category Pages using deprecated source tags)# explicit allowlist Server { allow 192.168.1.0/24; # entire subnet deny all; }119 bytes (13 words) - 21:39, 21 March 2021
- Delta (category Pages using deprecated source tags)colourized side-by-side diffs and pager. brew install git-delta delta 1.txt 2.txt # combined diff delta -s 1.txt 2.txt # side-by-side diff453 bytes (28 words) - 02:24, 13 July 2022
- Cpp qt: simple (category Pages using deprecated source tags)The simplest possible build I could think of to test with. src/main.cpp #include <QtWidgets/QApplication> #include <QtWidgets/QPushButton> int main(int326 bytes (39 words) - 21:52, 8 February 2019
- Nix files (category Pages using deprecated source tags)imports bind all of the let variables defined within a file to a set. # ./foo.nix let a = "A" fn = x: x # ./bar.nix foo = import ./foo.nix {}; # foo expects450 bytes (55 words) - 13:14, 16 August 2020
- Sphinx hosting (category Pages using deprecated source tags)# /usr/local/etc/nginx/nginx.conf user www www worker_processes auto; worker_cpu_affinity auto; events { multi_accept on; worker_connections 1024; } http446 bytes (52 words) - 23:43, 28 February 2021
- Vbscript conditionals (category Pages using deprecated source tags)If var = 1 Then stdout.WriteLine "condition A" ElseIf var = 2 Then stdout.WriteLine "condition B" Else stdout.WriteLine "condition C" End If d=weekday(date)381 bytes (43 words) - 00:14, 8 December 2019
- Pcmanfm (category Pages using deprecated source tags)Pcmanfm is LXDM's file manager. It featureful, themable, and low on dependencies. A clear win. sudo pacman -S pcmanfm sudo pacman -S tumbler # image thumbs318 bytes (33 words) - 16:44, 26 December 2019
- Ezjail (category Pages using deprecated source tags)Shellscripts for managing FreeBSD jails. # create a jail ezjail-admin install ezjail-admin create example.com 'em0|10.0.0.2' ezjail-admin start example617 bytes (26 words) - 03:51, 10 June 2020
- Xdotool (category Pages using deprecated source tags)target windows lots more Xdotool itself does not record keybindings, but used with xbindkeys, you can bind keys to other keys. xdotool key Home ## Virtual610 bytes (81 words) - 14:40, 18 February 2019
- Ruby csv (category Pages using deprecated source tags)csv = CSV.new(File.read('out.csv')) csv.read # array of rows csv << [0, 1, 2] # append row to csv csv = CSV.new(<<~CSV, headers: true) id, name 123, foouser354 bytes (56 words) - 18:27, 7 December 2023
- Gnu patch (category Pages using deprecated source tags)patch a codebase patch directories diff -ruN new/ old/ > diff.patch # create patch patch -ruN -d working < diff.patch # apply patch patch files diff -u377 bytes (45 words) - 03:29, 21 September 2020
- Baikal install (category Pages using deprecated source tags)sudo pkg install baikal nginx openssl # add user Will to group www pw groupmod www -M will Set up an httpd directive See `/usr/local/share/examples/baikal`475 bytes (58 words) - 01:41, 17 July 2020
- Rdesktop (category Pages using deprecated source tags)rdesktop lets you access windows over RDP from a X11 displayserver. rdesktop \ -P \ -z \ -x 1 \ -r sound:off \ -u 'domain.com\willp' \ -p 'password' \424 bytes (28 words) - 01:04, 21 September 2020
- Gpart (category Pages using deprecated source tags)gpart is a BSD tool for working with partition tables. Similar to linux's fdisk. camcontrol devlist # list all devices gpart list # print all disks (with557 bytes (78 words) - 19:25, 12 February 2022
- Cmake general utilities (category Pages using deprecated source tags)get information about the system running cmake. cmake_host_system_information( RESULT os_name QUERY OS_NAME ) if (os_name =183 bytes (20 words) - 19:05, 18 May 2018
- Broot (category Pages using deprecated source tags)Fuzzy directory tree searching. pacman -S broot You'll also need to define the function br. # ~/.zshrc function br { local cmd cmd_file code cmd_file=$(mktemp)723 bytes (51 words) - 17:41, 3 July 2021
- Powershell loops (category Pages using deprecated source tags)$array = 'a','b','c' ForEach ($item in $array){ # do stuff } foreach ($dir in (get-childitem -recurse -path . -filter "package.py)) { cd $dir.DirectoryName;530 bytes (46 words) - 03:20, 19 September 2018
- Shairport (category Pages using deprecated source tags)issuing: systemctl enable avahi-daemon.service In order to run shairport, use the shairport.pl script. Can be run from dmenu, or a terminal window. Avahi-daemon433 bytes (59 words) - 20:00, 21 February 2021
- Hexchat (category Pages using deprecated source tags)pinephone. server: domain.com/1025 - [x] connect to selected servers only - [x] use ssl for all the servers on this network username: you/freenode login_method:362 bytes (39 words) - 06:02, 11 November 2020
- Xpad (category Pages using deprecated source tags)The builtin linux gamepad driver. NOTE: linux kernel 3.17+ supports wired xbox one controller natively. sudo pacman -S xpad sudo modprobe xpad237 bytes (23 words) - 02:48, 27 June 2021
- Python mock: mock objects (category Pages using deprecated source tags)mock = mock.Mock() mock.a() >>> <Mock id='1234567'> mock.a >>> <Mock id='7654321'> mock.a.return_value = 'hi' mock.a() >>> 'hi'162 bytes (21 words) - 03:56, 10 August 2019
- Qutebrowser commands (category Pages using deprecated source tags)Some useful commands I use frequently :download-clear " clear completed downloads :tab-select " fuzzy-select tab to view :devtools " chrome dev tools :config-edit452 bytes (36 words) - 01:59, 4 September 2022
- Ruby thin (category Pages using deprecated source tags)A webserver. http://maratgaliev.com/bigsur-rails/ gem install thin -v '1.7.2' -- --with-cflags="-Wno-error=implicit-function-declaration"276 bytes (21 words) - 16:00, 31 January 2021
- Mysql backup (category Pages using deprecated source tags)You'll need the full 'mysql' package rather than just the 'mysql-client' in order to do this: CREATE USER 'backup'@'ip-address' IDENTIFIED BY 'password';444 bytes (59 words) - 22:03, 23 March 2020
- Mutt abook (category Pages using deprecated source tags)--mutt-query '%s'" macro index a "|abook --add-email\n" 'add sender to abook' macro pager a "|abook --add-email\n" 'add sender to abook'337 bytes (37 words) - 17:06, 29 December 2020
- Ruby rails: install (category Pages using deprecated source tags)NOTE: sourcing chruby's activation script from bashrc while installing rails was causing it to fail with CRITICAL: RUBYGEMS_ACTIVATION_MONITOR.owned?:314 bytes (37 words) - 23:53, 9 April 2020
- Mutt install (category Pages using deprecated source tags)longer need to compile/patch with sidebar Install setup-x86.exe -q -P ^ mutt (source),^ msmtp,^ w3m,^ ncurses,^ libncurses-devel,^ abook,^ offlineimap,^ autobuild607 bytes (47 words) - 02:01, 2 July 2022
- Python termplotlib (category Pages using deprecated source tags)very useful python library that aims to reproduce matplotlib using ascii so that it can be used on headless servers. Unfortunately, it seems you cannot render401 bytes (64 words) - 23:48, 28 August 2020
- Tcpdump (category Pages using deprecated source tags)to try command with/without (-n) # to use ip-addrs instead of hostnames tcpdump -n -i eth0 # piping tcpdump using (-l) tcpdump -l -i eth0 | grep "192.1"512 bytes (85 words) - 02:29, 7 November 2021
- Mosh install (category Pages using deprecated source tags)You'll need to install mosh on both the client/server. Mosh works by first connecting over ssh, then starting and communicating via the mosh-daemon. There428 bytes (64 words) - 03:26, 29 December 2021
- Xrandr (category Pages using deprecated source tags)Xrandr allows you to manipulate query and manipulate display settings. xrandr --output VGA-1 --mode 1920x1080 # set resolution xrandr # query outputs/modes596 bytes (45 words) - 02:37, 27 August 2020
- Sudo usage (category Pages using deprecated source tags)# visudo (/etc/sudoers) will ALL=(ALL): ALL # full sudo permissions to user %group ALL=(ALL): ALL # full sudo permissions to group members superuser ALL=(ALL)588 bytes (58 words) - 21:11, 2 April 2022
- Giara (category Pages using deprecated source tags)Giara is a mobile reddit client for linux written in python. It works on the pinephone. pacaur -S giara-git445 bytes (20 words) - 03:28, 13 November 2020
- Powershell functions (category Pages using deprecated source tags)Function _AppendToPathEnv { param ( [Parameter (Mandatory=$true, position=2)] [String]$value ) # """ Appends a value to registry key, if it does not already692 bytes (69 words) - 19:32, 2 December 2019
- Tig (category Pages using deprecated source tags)gitk within your terminal. tig -G'def foo' file.txt # show comits with code changes involving 'def foo' uu # stage/unstage file for commit ul # stage/unstage736 bytes (39 words) - 14:07, 4 July 2022
- Vagrant: plugins (category Pages using deprecated source tags)ly/vagrant-lxc-wheezy64-2013-10-23' config.vm.define "db" do |node| # Set Container to use LXC config.vm.provider :lxc do |lxc| lxc.customize 'cgroup.memory.limit_in_bytes'503 bytes (66 words) - 17:02, 13 December 2019
- Batch modules (category Pages using deprecated source tags)REM batch script arguments are listed numerically in order REM path to batch script echo %0 REM arguments, in order echo %1 echo %2 ... number of arguments523 bytes (65 words) - 16:05, 10 July 2021
- Asus RT-N66U Router (category Pages using deprecated source tags)My router circa 2010. power button broke, but works if held down with tape. lan: dhcp: start: 192.168.1.100 start: 192.168.1.200 wan: port-forwarding:204 bytes (30 words) - 15:07, 23 December 2020
- Javascript jest (category Pages using deprecated source tags)A test framework for javascript. // ${project}/foo.js function sum(a, b) { return a + b; } // ${project}/foo.test.js const sum = require('./foo.js'); test('1522 bytes (35 words) - 02:05, 17 June 2021
- Pev (category Pages using deprecated source tags)Windows executable info from linux. (ex: build version). pacaur -S pev # get windows executable version peres -v DDDA.exe | grep 'File Version' # ?? info583 bytes (31 words) - 21:06, 1 May 2021
- Css cookbook (category Pages using deprecated source tags)https://stackoverflow.com/questions/46690572/indent-content-based-on-headings h1, h1 ~ *, h2 ~ h1, h2 ~ h1 ~ *, h3 ~ h1, h3 ~ h1 ~ * { margin-left: 0px;429 bytes (49 words) - 22:17, 2 May 2021
- Github ui (category Pages using deprecated source tags)# shopify is:open is:pr -is:draft -reviewed-by:@me review-requested:@me +is:pr # only include pull requests -is:draft # remove drafts -is:approved # removes557 bytes (49 words) - 15:41, 19 September 2021
- Batch loops (category Pages using deprecated source tags)REM (start-counting-at, iterate-by, stop-counting-at) FOR /L %%i IN (0, 1, 5) DO ( echo %%i ) FOR /D %%d IN (root will vagrant build) DO ( echo %%d ) FOR410 bytes (39 words) - 00:29, 12 October 2018
- VimPlugin: gitlink-vim (category Pages using deprecated source tags)Get link for current line in github. :GitLink282 bytes (8 words) - 19:49, 14 February 2021
- Python qt: tabs (category Pages using deprecated source tags)## Build Widgets layout = QtGui.QVBoxLayout() tab_layout = QtGui.QTabWidget() info_manager = QtGui.QPushButton('manager info') info_tasks = QtGui.QPushButton('task408 bytes (50 words) - 02:24, 23 May 2018
- regular vimrc. lua <<EOF -- some lua code EOF " ~/.config/nvim/init.vim " source vimrc from init.vim set rtp^=HOME/.vim so ~/.vimrc648 bytes (42 words) - 14:53, 21 January 2022
- Yarn (category Pages using deprecated source tags)replacement that is parallellized. TODO: split this into yarn-1 and yarn-2 pages yarn run ... # runs a command from your package.json500 bytes (24 words) - 15:32, 26 June 2023
- Browsh (category Pages using deprecated source tags)webbrowser that uses a headless firefox and renders using libcaca to a terminal. pacman -S go-bindata dep pacaur -S browsh browsh is intended t obe used with a546 bytes (44 words) - 04:23, 21 September 2020
- Viu (category Pages using deprecated source tags)viu displays images within a terminal using squares. It even supports animated gifs! pacaur -S viu viu image.png # display image viu -w 50 image.png #510 bytes (33 words) - 01:02, 31 December 2020
- Sphinx configuration (category Pages using deprecated source tags)# ${PACKAGE}/source/conf.py # loaded from ${site-packages}/sphinx/themes/ html_theme = 'alabaster' Each theme may define it's own additional options. https://pypi816 bytes (40 words) - 12:40, 4 July 2022
- Windows FileShares (category Pages using deprecated source tags)# permanently mount \\groot\movies to K: net use K: /delete /y # unmount K: (if mount created using net use)553 bytes (48 words) - 22:26, 23 November 2019
- Python wave (category Pages using deprecated source tags)docs intro tutorial https://www.tutorialspoint.com/read-and-write-wav-files-using-python-wave detailed tutorial https://nbviewer.jupyter.org/github/mgeier661 bytes (36 words) - 21:12, 31 August 2019
- Python pudb (category Pages using deprecated source tags)pudb is a gui debugger. Watch a Variable watching a variable in pudb enters it into the GUI on the top right. Breakpoints are not added, it simply displays449 bytes (76 words) - 22:13, 6 May 2018
- VimPlugin: vim-pyunit (category Pages using deprecated source tags)NOTE: use VimPlugin: vim-test instead vim pyunit integrates nose into vim, allowing you to test functions/modules as you write/refactor straight from your404 bytes (57 words) - 17:01, 14 February 2021
- Gpick (category Pages using deprecated source tags)gpick is a colorpicker for linux. move the pointer over anywhere on screen, and hit spacebar to save a colorsample (in hex code). sudo pacman -S gpick221 bytes (27 words) - 17:35, 30 March 2019
- Jinja2 usage (category Pages using deprecated source tags)from jinja2 import Template template = Template('Hello {{ "will" | replace( "w", "W" ) }}' + last_name ) template.render( last_name='Pittman' ) ## Will655 bytes (62 words) - 14:58, 7 June 2020
- Percentage faster/slower (category Pages using deprecated source tags)(new - old) / old * 100 # how much faster is 'new' than old (old - new) / old * 100 # how much slower is 'new' than old252 bytes (22 words) - 12:53, 16 March 2019
- Mpc (category Pages using deprecated source tags)mpc is a simple commandline client for mpd. mpc ls # list all files in music-dir mpc ls 'Adam and the Ants' # list files in subdir mpc update --wait 'Adam633 bytes (58 words) - 15:57, 16 April 2022
- Ruby rdoc (category Pages using deprecated source tags)tool to build apidocs for ruby. # Converts the object into textual markup given a specific `format` # (defaults to `:html`) # # == Parameters: # format::427 bytes (56 words) - 19:48, 1 March 2020
- Eclipse (category Pages using deprecated source tags)Eclipse is a general purpose IDE - mostly used for Java and C++ development. # release types: R = Release SR = Service Release RC = Release Candidate M576 bytes (41 words) - 20:21, 1 March 2020
- Wine mono (category Pages using deprecated source tags)Mono developed specifically for running within wine. # proton protontricks -s 'game name' # find game id protontricks -c 'wine64 uninstaller' ${APPID}571 bytes (39 words) - 01:45, 9 March 2021
- Python pytz (category Pages using deprecated source tags)def validate_datetime( mydt ): if mydt.tzinfo != pytz.utc: raise TypeError('Expected a UTC datetime object with tzinfo set to UTC') ## get utcnow localized572 bytes (73 words) - 19:14, 6 May 2018
- Php datatypes (category Pages using deprecated source tags)$firstname = "darth"; $fullname = "$name vader"; // string interpolation Arrays in php are not homogenous, and include datatypes like associative arrays774 bytes (51 words) - 23:58, 9 July 2020
- Nodejs subprocesses (category Pages using deprecated source tags)'FOO' process.exit(1) # terminate with exit code 1 process.exitCode = 1 # use exitcode at termination let pid = 1234 process.kill(pid, 'SIGTERM') os.constants679 bytes (39 words) - 20:53, 31 July 2021
- Java processes (category Pages using deprecated source tags)import java.util.Map; Map<String> env = System.getenv(); // get all environment variables System.getenv("HOME"); // get environment variable "HOME" (returns626 bytes (60 words) - 02:40, 24 June 2022
- Cmake loops (category Pages using deprecated source tags)FOREACH( i IN list ) BREAK( n ) ENDFOREACH( i ) # Iterate over arguments FOREACH( i 1 2 3) # ... ENDFOREACH( i ) # Iterate over list SET( x "a" "b" "c"526 bytes (58 words) - 19:00, 18 May 2018
- Ruby rack (category Pages using deprecated source tags)library for working with HTTP requests. Rack expects code that works with it to use the method call which returns a list with status, headers, body. require "rack"460 bytes (51 words) - 14:37, 5 April 2020
- Ruby rails: scopes (category Pages using deprecated source tags)Scopes are custom queries that you define inside your Rails models. They return ActiveRecord::Relation objects. Scopes can be chained together. class Fruit531 bytes (51 words) - 18:13, 9 April 2020
- Comic flow (category Pages using deprecated source tags)An ios comic book reader. Supports adding comics by HTTP server or WEBDAV. Settings > Website # create directory, add comics by directory406 bytes (21 words) - 20:23, 21 February 2021
- Marvin3 (category Pages using deprecated source tags)ios ebook reader, that can synchronize with calibre. NOTE: kybook2 supports more formats, and also syncs with calibre - choose opds - add calibre url with323 bytes (30 words) - 04:54, 22 February 2021
- Docker-compose syntax (category Pages using deprecated source tags)docker-compose.yml version: '2' services: db: image: postgres:9.4.1 ports: - "5432:5432" rails: build: . command: bin/rails server --port 3000 --binding563 bytes (38 words) - 21:55, 18 April 2020
- Multimedia keyboards (category Pages using deprecated source tags)Fn + Capslock # toggles fn-keys vs f-keys (at least logitech) # temporary: su echo 2 >> /sys/module/hid_apple/parameters/fnmode # permanent: echo "options461 bytes (36 words) - 23:12, 12 June 2020
- Python coroutines (category Pages using deprecated source tags)Python coroutines introduce eventloops to python's standard library (the reactor pattern). an eventloop is created a coroutine is added to the eventloop640 bytes (79 words) - 17:14, 7 December 2019
- Python snakeviz (category Pages using deprecated source tags)snakeviz is pretty neat, but nowhere near as useful as runsnakerun. It does however support python3. python -m cProfile -o output.pstat file.py python261 bytes (29 words) - 00:46, 20 February 2019
- Vscode plugin: java extension pack (category Pages using deprecated source tags)code --install-plugin vscjava.vscode-java-pack132 bytes (7 words) - 19:24, 2 November 2019
- Visualstudio 11 (2012) (category Pages using deprecated source tags)NOTE: I cannot find any documentation (official, mirror, blog, ...) for visualstudio versions this old core en_visual_studio_express_2012_for_windows_455 bytes (46 words) - 00:08, 9 March 2019
- Java conditionals (category Pages using deprecated source tags)if (x == y) { // ... } else if (x > y) { // ... } else { // ... } switch (month) { case "september": // ... break; case "october": // ... break; default:727 bytes (38 words) - 15:14, 6 July 2019
- Ruby matching (category Pages using deprecated source tags)ruby's handling of regex looks similar to awk. if 'ruby' =~ /^ru/ puts 'ruby starts with 'ru' end lang = 'ruby' lang = %r'ruby' # regex string lang = /ruby/568 bytes (41 words) - 19:51, 22 June 2021
- Dockerfile usage (category Pages using deprecated source tags)80:8080 `# expose container 80 as host 80` \ -ti <image_name> /bin/bash # use created container sudo docker start <container_name> # run already created653 bytes (86 words) - 13:24, 10 April 2023
- Latex usage (category Pages using deprecated source tags)% file.tex % (example copied from https://www.overleaf.com/learn/latex/Learn_LaTeX_in_30_minutes ) \documentclass[a4paper,12pt]{article} \begin{document}728 bytes (55 words) - 00:44, 26 August 2022
- Github api v3 (category Pages using deprecated source tags)headers = {'Authorization': 'token ....', 'User-Agent': 'octocat'} # alt - program-name conn = HTTPSConnection(self._domain, 443) conn.request('GET',539 bytes (22 words) - 14:19, 20 September 2023
- MySQL (category Pages using deprecated source tags)A very popular SQL relational database. mysql -u USER -h host.domain.com -P 3306 --password=PASS806 bytes (17 words) - 04:13, 11 September 2022
- Md2googleslides (category Pages using deprecated source tags)Tool to convert markdown projects to google slides. npm install -g md2gslides # normal sudo npm install --unsafe-perm -g md2gslides # macos Create a slideshow748 bytes (52 words) - 00:15, 27 January 2021
- VimPlugin: tabman (category Pages using deprecated source tags)Overview of open tabs and splits. Like VimPlugin: NERDTree and VimPlugin: TagBar but for tabs/splits. :TMToggle " show splits-per-tab374 bytes (21 words) - 19:45, 14 February 2021
- Ruby rubocop (category Pages using deprecated source tags)A ruby linter. rubocop # test all files rubocop file.rb # test single file rubocop -D file.rb # print name of rule-failures # rubocop:disable RuleByName633 bytes (43 words) - 19:07, 25 May 2021
- Fat32 (category Pages using deprecated source tags)old but universal filesystem constrained by partition and file size. Linux sudo fdisk /dev/sdb g # create gpt table n # create partition t # 11 (Microsoft588 bytes (55 words) - 23:11, 28 September 2020
- Python python-daemon (category Pages using deprecated source tags)pip install python-daemon import daemon from daemon import pidfile context = daemon.DaemonContext( pidfile=pidfile.PIDLockFile('/var/run/perf-agent.pid')561 bytes (21 words) - 16:06, 12 May 2018
- Mpd extensions (category Pages using deprecated source tags)sudo pip install python-musicpd import musicpd c = musicpd.MPDClient() c.connect('localhost', 6600) c.find('genre', 'Jazz') c.close() echo "currentsong"695 bytes (43 words) - 18:09, 6 February 2022
- Css (category Pages using deprecated source tags)css sources css selectors css units css cookbook css CSSDOM982 bytes (36 words) - 02:57, 26 September 2021
- net/cscope_vim_tutorial.html Change the locations vim searches for tags :set tags=./tags,c:/ruby/lib/tags287 bytes (29 words) - 00:23, 13 April 2020
- Python queue (category Pages using deprecated source tags)NOTE: I've ran into strange bugs when not using multiprocesing.queue Queues support both primitive objects and your own custom objects. I have found the452 bytes (51 words) - 00:52, 15 September 2019
- Steamos-xpad (category Pages using deprecated source tags)This worked very well for me until I started using wine/proton games. I then started having issues with keymaps. sudo pacman -S dkms pacaur -S steamos-xpad-dkms284 bytes (34 words) - 02:52, 27 June 2021
- Ffmpeg record from usb (category Pages using deprecated source tags)Identify video source: ffmpeg -sources Identify ALSA (sound) sources arecord -l # you're looking for the card# and subdevice# # when using within ffmpeg:454 bytes (51 words) - 15:14, 7 June 2018
- Dragons Dogma (category Pages using deprecated source tags)runs excellently in steam proton! enb mods added using read-only overlayfs xbox one gamepad works using xpadneo driver make sure to configure nvidia driver815 bytes (75 words) - 21:45, 10 July 2021
- Csharp anatomy (category Pages using deprecated source tags)// example import using System; /// <summary>namespace for printing hello /// </summary> namespace helloworld { /// <summary> Runs HelloWorld /// </summary1 KB (47 words) - 03:48, 3 November 2019
- Mono csharp (category Pages using deprecated source tags)line also requires 'Enter'. csharp using System; System.WriteLine("abc"); NOTE: tab completion selection up/down use arrowkeys, or vi-style Ctrl-(n/p)624 bytes (44 words) - 21:16, 2 November 2019
- Baikal clients (category Pages using deprecated source tags)option for authorization, my preference is Digest rather than Basic. # When using CarDAV/CalDAV, refer it to either cal.php, or card.php http://morpheus/cal716 bytes (101 words) - 01:44, 17 July 2020
- Bash matching (category Pages using deprecated source tags)Bash can be extended to have more fancy glob, but using purely the default shell, this is what we're looking at. Technically, it is a subset of modern727 bytes (91 words) - 13:12, 29 August 2021
- Flacbox (category Pages using deprecated source tags)A music player. Add music over SMB. Instead of using itunes, I've opted to use flacbox. It allows you to define an SMB share, and browse/download music943 bytes (64 words) - 06:22, 24 December 2022
- Visualstudio 14 (2015) (category Pages using deprecated source tags)visualstudio 14 does not use commandline parameters to define features to install. Instead, you can export your configuration from a working visualstudio660 bytes (43 words) - 00:05, 9 March 2019
- Komorebi (category Pages using deprecated source tags)Komorebi is a video wallpaper manager (or parallax etc). It doesn't play nice with i3, and it's a little bloated for my liking. pacman -S gendesk pacaur351 bytes (29 words) - 23:01, 19 July 2020
- Javascript conditionals (category Pages using deprecated source tags)Not requires an additional set of brackets. if (!(foo == "bar")) { ... } if (var == "one") { // ... } else if (var == "two") { // ... } else { // ... }885 bytes (47 words) - 20:07, 18 December 2022
- Origin (category Pages using deprecated source tags)EA Origin is Electronic Art's game distrobution platform. Origin is not available natively on linux, but you can install it easily in wine. export WINEARCH="win32"681 bytes (55 words) - 22:12, 8 February 2021
- Standards: filesystem (category Pages using deprecated source tags)char_range = '^[a-zA-Z0-9{}]+'.format(re.escape('_ .()')) invalid_filenames = ( ['CON', 'PRN', 'AUX', 'NUL', 'CLOCK', '..', '.'] + ['COM{}'.format(i) for726 bytes (45 words) - 21:19, 19 September 2021
- Mkvtoolsnix (category Pages using deprecated source tags)Tools to interact with MKV files - splitting/merging them by chapter, etc. pacman -S mkvtoolsnix-cli mkvtoolsnix-gui mkvmerge input.mkv --split chapters:all604 bytes (64 words) - 22:32, 13 April 2018
- Pycharm (category Pages using deprecated source tags)PyCharm is a proprietary python IDE. It facilitates refactoring, and provides a vi mode. File > Settings: Keymap: Navigate: File... # Ctrl T Alt + F12481 bytes (26 words) - 12:11, 27 April 2018
- Vbscript loops (category Pages using deprecated source tags)For i = 0 To 5 response.write("The number is " & i & "<br />") Next For i=2 To 10 Step 2 some code Next Dim cars(1) cars(0)="Volvo" cars(1)="Saab" For404 bytes (54 words) - 00:16, 8 December 2019
- Agrep (category Pages using deprecated source tags)agrep is grep, but with additional fuzzy matching. sudo pacman -S tre # '-1' allows matches with 1 char different find . -name '.git' | agrep -1 'mui'826 bytes (34 words) - 14:26, 10 February 2021
- Java modifiers (category Pages using deprecated source tags)Modifiers are used to describe methods/attributes. They generally either limit access, or change how the item is treated by the JVM. class MyClass { //951 bytes (36 words) - 19:05, 9 February 2019
- Wmctrl (category Pages using deprecated source tags)A tool to control linux UI from the terminal. # list all window-ids by desktop-id wmctrl -l # ${window_id} ${desktop_id} ${hostname} ${window_title} wmctrl581 bytes (77 words) - 14:29, 18 July 2021
- Fallout4 Gameplay (category Pages using deprecated source tags)# environment Tab # pip-boy Tab (hold) # flashlight v # toggle 3rd person v (hold) # crafting menu (on settlement) # combat r # reload r (hold) # show/hide846 bytes (64 words) - 03:30, 11 November 2021
- Fdisk (category Pages using deprecated source tags)fdisk allows you to create mbr/gpt partitions on linux. sudo fdisk /dev/sdb d # delete partition table g # create gpt partition table p # print partition651 bytes (61 words) - 04:39, 30 May 2020
- Viml loops (category Pages using deprecated source tags)" Iterate chars in string for item in split("abcd", '\zs') echom item endfor " Iterate Through Lists for l in ['a','b','c'] echo l endfor " Iterate numbers709 bytes (76 words) - 22:50, 2 January 2023
- Ruby rails: logging (category Pages using deprecated source tags)Rails.logger. Investigate. Rails.logger = Logger.new(STDERR) Rails.logger.level = Logger::DEBUG Rails.logger.datetime_format = "%Y-%m-%d %H:%M:%S" class669 bytes (61 words) - 18:24, 8 August 2020
- Ruby bai2 (category Pages using deprecated source tags)Bai2 files are sent from banks with information about all of the transactions they have processed. bai2.groups.each do |group| group.accounts.each do |account|430 bytes (31 words) - 21:56, 19 May 2021
- Vampyr (category Pages using deprecated source tags)- change from 5760x1080, then back, and click apply NOTE: Within dialog, use WASD to look up/down WARNING: The FOV needs fixing, and despite several fixes875 bytes (102 words) - 22:47, 23 September 2019
- Python virtualenv (category Pages using deprecated source tags)defined requirements venv/bin/python I don't believe this exists, but you could use python tox to manage building virtualenvs built from setup.py608 bytes (42 words) - 21:13, 3 August 2020
- VimPlugin: Ale (category Pages using deprecated source tags)An asynchronous, language agnostic linting library. :ALEInfo " see ale config for current file let g:ale_sign_column_always = 1 let g:ale_open_list = 0642 bytes (64 words) - 23:22, 6 February 2023
- Freebsd rc troubleshooting (category Pages using deprecated source tags)Sometimes, you don't have time to troubleshoot why a particular command is not working. You can get around this in two ways: rc.local method # /etc/rc586 bytes (57 words) - 18:35, 22 October 2022
- Freebsd jail setup: deleting jails (category Pages using deprecated source tags)FreeBSD base installs have permissions assigned that prevent them from being completely deleted. # correc chflags -R noschg /usr/local/jails/{jail}/* sudo218 bytes (28 words) - 17:19, 13 June 2020
- Portmaster (category Pages using deprecated source tags)tool that allows you to manage your installed ports on a freebsd system. I use it often when I am performing a freebsd-upate. portmaster -Da # upate all300 bytes (34 words) - 18:59, 5 April 2018
- Xorg troubleshooting (category Pages using deprecated source tags)Check for (EE) messages within /var/log/Xorg.0.log Try journalctl -b Try loading Kernel Mode Setting (KMS - setting resolution/depth in kernel rather than723 bytes (71 words) - 13:41, 27 June 2021
- Python requests (category Pages using deprecated source tags)import requests url = 'http://localhost:5000/test' headers = {'Content-Type': 'application/json; charset=utf-8'} json_data = '{"user": "me"}' reply = requests783 bytes (71 words) - 20:17, 16 July 2019
- Python qt: testing (category Pages using deprecated source tags)from Qt import QtWidgets import myactions import mymodel import mock if not QtWidgets.QApplication.instance(): qapp = QtWidgets.QApplication() class D671 bytes (64 words) - 21:42, 12 February 2020
- React projects (category Pages using deprecated source tags)TODO: more thorough Creates an empty nodejs react project with jest as a test-suite. pacman -S nodejs npx create-react-app my-app node_modules/ public/737 bytes (58 words) - 21:31, 10 December 2022
- Functional Programming (category Pages using deprecated source tags)Functional programmers talk about pipelines, or map/reduce. This is simply a way of passing the same value through several functions. import functools676 bytes (60 words) - 12:49, 2 September 2019
- Python vprof (category Pages using deprecated source tags)vprof is my new favourite profiler. I think I actually like it more than runsnakerun. vprof -c cmh "file.py --cmd 1" # run profiler392 bytes (24 words) - 18:33, 24 February 2019
- Vscode plugin: align-by-regex (category Pages using deprecated source tags)code --install-plugin janjoerke.align-by-regex - Select Text - Ctrl + Shift + P: align by regex - type regex of text to align214 bytes (21 words) - 19:18, 2 November 2019
- Bindfs (category Pages using deprecated source tags)bindfs lets you mount directories as other directories optionally, modifiying their permissions. Linux only, for BSD see nullfs. # cli bindfs -u www -g552 bytes (40 words) - 18:45, 1 May 2021
- Fuse (category Pages using deprecated source tags)module kldload fusefs.ko # FreeBSD modprobe fuse # Linux Fuse is normally used by another filesystem, ex: sshfs. Load fuse kernel module on boot # /boot/loader1 KB (62 words) - 23:18, 15 November 2021
- Modprobe (category Pages using deprecated source tags)modprobe loads kernel modules Temporarily load kernel modules sudo modprobe $KERNEL_MODULE Permanently load kernel modules at boot (in this case, deps862 bytes (50 words) - 17:41, 26 November 2020
- Java loops (category Pages using deprecated source tags)// statement1: run once before starting loop // statement2: while statement true, looping continues // statement3: execute once per loop for (int i=0;787 bytes (57 words) - 18:13, 9 February 2019
- Bash operators (category Pages using deprecated source tags)especially when starting out. There are two types of expressions in bash, and each uses different operators. [ 123 -eq 123 ] # equal [ 123 -ne 321 ] # not equal772 bytes (85 words) - 23:27, 11 May 2018
- Digitalocean images archlinux (category Pages using deprecated source tags)Run archlinux on digitalocean. Not officially supported. curl -O https://raw.githubusercontnet.com/robsonde/digitalocean_builder/master/make_image.sh chmod559 bytes (41 words) - 05:22, 7 August 2021
- Batch error handling (category Pages using deprecated source tags)The %ERRORLEVEL% variable is roughly equivalent to bash's $?. A process-exit code of 0 indicates that a process completed successfully. some-command.exe517 bytes (60 words) - 00:38, 12 October 2018
- Ruby extensions (category Pages using deprecated source tags)Building ruby gems with C extensions. INCLUDE/LIB directories (extconf.rb params). # https://bugs.ruby-lang.org/issues/7173 ruby \ --with-opt-dir /opt/package591 bytes (35 words) - 15:32, 3 June 2020
- Qjoypad (category Pages using deprecated source tags)A program to remap joypad buttons to keyboard buttons. NOTE: archlinux no longer has qjoypad in it's repo. See antimicro. sudo pacman -S qt4-base qt-chooser360 bytes (47 words) - 14:12, 11 October 2018
- VimPlugin: Speech (category Pages using deprecated source tags)Text to speech in vim. Useful for oral surgery. Built overtop of google's Speech API. <leader>s " read current line out loud <leader>r " record voice and405 bytes (30 words) - 17:36, 14 February 2021
- Python pyautogui (category Pages using deprecated source tags)pyautogui exposes cross-platform mouse/keyboard/window controls. Like autohotkey, but totally portable. Usage is extremely simple. For example: pyautogui607 bytes (37 words) - 15:48, 28 September 2019
- Python pyoxidizer (category Pages using deprecated source tags)Embeds python executable within a rust program. Creates single file (statically linked) executable. Supports linux, mac, windows. Install rust cargo install484 bytes (22 words) - 12:49, 21 October 2019
- Python setuptools: requirements (category Pages using deprecated source tags)from setuptools import setup setup( # ... install_requires=['six', 'pyyaml'], # installed before `python setup.py install` tests_require=['pytest', 'mock']711 bytes (46 words) - 23:27, 3 August 2020
- Talon syntax (category Pages using deprecated source tags)# ~/.talon/user/**/*.talon os: linux # mac, linux - vim: # voice command for word 'vim' user.system_command('vim') # run command key(ctrl-t) # insert keys820 bytes (46 words) - 22:49, 28 January 2021
- Gpicview (category Pages using deprecated source tags)gpicview is a gui image viewer, similar to microsoft's image viewer. You can preview, rotate an image etc. pacman -S xdg-utils xdg-mime default gpicview522 bytes (40 words) - 02:58, 12 June 2020
- Vagrant: provisioning (category Pages using deprecated source tags):run => 'always' # copy a file into vagrant config.vm.provision "file", \ source: "sshkeys/ansible_server/id_rsa.pub" \ destination: "~/.ssh/id_rsa.pub"758 bytes (104 words) - 16:54, 13 December 2019
- Ffmpeg for format (category Pages using deprecated source tags)<video width="640x480" controls> <source src="my/video.mp4" type="video/mp4"> Your browser does not support the video tag. </video> </body> </html>770 bytes (78 words) - 00:47, 23 July 2021
- SSL certificate creation (category Pages using deprecated source tags)You can generate SSL certs using openSSL. These certificates can be self-signed (not very secure), or signed by a certificate authority (the purpose of591 bytes (82 words) - 13:42, 14 March 2021
- Jupyter notebook (category Pages using deprecated source tags)block. cells can be selected using their left-margin. The can be shifted up, down, deleted etc. python matplotlib can be used within cells to render diagrams806 bytes (82 words) - 19:10, 27 September 2019
- Qutebrowser usage (category Pages using deprecated source tags):set colors.webpage.bg black You can view the various available settings using :set colors.<TAB> " interactively test the settings you'd like disable javascript906 bytes (86 words) - 03:27, 4 September 2022
- Geary (category Pages using deprecated source tags)ran with little tweaking) The following settings ## are what I ended up using: export SSH_AUTH_SOCK="/tmp/gpg-gXLJ5S/S.gpg-agent.ssh"660 bytes (86 words) - 22:21, 8 February 2021
- Freebsd jail setup: networking (category Pages using deprecated source tags)By default, ping is not permitted within jail. Test using netcat nc -z www.google.ca 80 Alternatively, configure jail to allow raw sockets # /etc/jail576 bytes (31 words) - 15:26, 3 July 2020
- Capt (category Pages using deprecated source tags)sudo pacman -S cups pacman -S capt-src # 1) add your user to group 'lp' gpasswd -a will lp # 2) reboot sudo reboot # 3) connect printer via usb # 4) enable/restart918 bytes (128 words) - 00:40, 31 January 2020
- Mrxvt (category Pages using deprecated source tags)A terminal with tabs. Occasionally available in package repos. # Solarized Dark/Light # -------------------- #Mrxvt.background: #002B36 Mrxvt.background:1 KB (92 words) - 14:27, 14 March 2021
- Sphinx sphinx-autobuild (category Pages using deprecated source tags)LiveReload plugin for sphinx. pip install sphinx-autobuild By Hand sphinx-autobuild docs docs/_build/html # watch changes in `docs`, build in `docs/_build/html`817 bytes (37 words) - 15:00, 14 March 2021
- Python flake8 (category Pages using deprecated source tags)Flake8 seems to be the normal solution used. It enforces the pep8 style on your project. Add a setup.cfg to the root of your project. [flake8] max_line_length665 bytes (59 words) - 20:24, 6 May 2018
- Cpp qt: qmake (category Pages using deprecated source tags)mybutton.h src/ main.cpp mybutton.cpp main.pro main.pro QT += widgets core gui SOURCES += src/main.cpp src/mybutton.cpp HEADERS += include/mybutton.h INCLUDEPATH742 bytes (95 words) - 21:26, 8 February 2019
- Cpp qt: subclassing (category Pages using deprecated source tags)include/mybutton.h #ifndef MYBUTTON_H #define MYBUTTON_H #include <QtWidgets/QPushButton> class MyButton: public QPushButton { Q_OBJECT; public: explicit826 bytes (78 words) - 21:45, 8 February 2019
- Python qt: workflow notes (category Pages using deprecated source tags)Deleting layouts does not always work well, you'll have much more predictable results if you put your layout into an empty QWidget, then delete the QWidget520 bytes (56 words) - 01:36, 22 May 2018
- Vbscript datatypes (category Pages using deprecated source tags)Dim var var="my var" Dim var var=1 Arrays have a fixed size. It must be declared at creation. Dim names(2) names(0)="will" names(1)="russ" names(2)="vader"801 bytes (89 words) - 00:11, 8 December 2019
- VimPlugin: dbext (category Pages using deprecated source tags)Database client that is accessed through vim. Supports several database types. Plugin 'https://github.com/vim-scripts/dbext.vim' let g:dbext_default_profile_mayadb545 bytes (66 words) - 19:41, 30 March 2019
- Empathy (category Pages using deprecated source tags)empathy is an IRC/misc chat program built overtop of gnome telepathy. You may use empathy to setup polari, or on it's own (it's quite mobile friendly). network:439 bytes (49 words) - 17:13, 7 February 2021
- Btsync (category Pages using deprecated source tags)Bittorrent Sync is a tool to keep two file systems in sync. Like dropbox, but encrypted, and hosted on your computer. NOTE: This has been renamed 'resilio405 bytes (49 words) - 05:35, 24 December 2022
- Jail usage (category Pages using deprecated source tags)# basics jls # list all jails jexec ${jail} # enter jail service jail start ${jail} # start jail jexec ${jail} <command> # run command in jail jexec ${jail}918 bytes (97 words) - 14:45, 11 June 2022
- Boto3 S3 (category Pages using deprecated source tags)session = boto3.session.Session() client = session.client( service_name='S3', region='nyc', # do spaces region code endpoint_url='https://nyc.digitaloceanspaces864 bytes (70 words) - 13:12, 4 March 2019
- Observer pattern (category Pages using deprecated source tags)The observer pattern is used when several objects need to to be notified of changes to one object. (a log-watcher, weather-data, chatroom, ...). Instead826 bytes (104 words) - 01:14, 2 May 2020
- Ruby byebug (category Pages using deprecated source tags)A third party debugger for ruby. Modeled after gdb. TODO: add quick reference notes -- ex: how to start byebug? gem install byebug459 bytes (22 words) - 19:13, 1 September 2021
- Java operating systems (category Pages using deprecated source tags)System.getProperty("os.name"); // System.getProperty("os.version"); // System.getProperty("os.arch"); // check os family osname = System.getProperty("os863 bytes (64 words) - 02:41, 24 June 2022
- Xev (category Pages using deprecated source tags)xev displays the keycode produced by a keypress within Xorg. For TTYs, see showkey. NOTE: You also can type characters following cat -E to obtain raw-ansi-escape719 bytes (82 words) - 15:23, 27 September 2020
- Csharp compilers (category Pages using deprecated source tags)The dotnet framework includes a C# compiler, and build system. dotnet new console -o helloworld cd helloworld dotnet run # run program dotnet publish -r671 bytes (43 words) - 20:41, 2 November 2019
- Neovim features (category Pages using deprecated source tags):version " list vim build params/features :checkhealth " list info about interpreters, parsers, etc. Neovim has it's own embedded terminal! :terminal "847 bytes (91 words) - 03:39, 26 December 2021
- Neovim guis (category Pages using deprecated source tags)neovim doesn't have an official UI, but it is built with a client-server model so that UIs can be built overtop of it. Essentially gvim for neovim. :GuiFont293 bytes (35 words) - 03:04, 26 December 2021
- Weechat multiline.pl (category Pages using deprecated source tags)allows you to enter multiline messages. /script install multiline.pl # alt+enter as newline /set plugins.var.perl.multiline.magic_paste_only on /key bind676 bytes (51 words) - 15:04, 22 May 2021
- Nodejs (category Pages using deprecated source tags)A commandline runtime environment for javascript. node script.js # run script node # interpreter1 KB (13 words) - 21:43, 18 December 2022
- Bash error handling (category Pages using deprecated source tags)By default, bash continues running when errors occur. You can change this behaviour by adding the following line to your bash script (at the top). set385 bytes (47 words) - 22:37, 11 May 2018
- Python multiprocessing (category Pages using deprecated source tags)See python threading, this interface duplicates it. See python concurrency for more examples of concurrency methods. import multiprocessing class Worker(multiprocessing575 bytes (53 words) - 20:53, 23 August 2020
- X360ce (category Pages using deprecated source tags)An LGPLv3 xbox360 controller emulator for windows. visit github and use download link from README run, there is no install click the rightmost "issues"859 bytes (66 words) - 14:10, 28 March 2021
- Nginx config (category Pages using deprecated source tags)nginx -t # test all nginx configfiles nginx -t -c /path/nginx.conf # test a specific nginx config # /usr/local/etc/nginx/nginx.conf user www www; worker_processes1 KB (93 words) - 19:19, 4 April 2021
- Nginx load balancing (category Pages using deprecated source tags)http { upstream my_upstream { server server1.example.com; server server2.example.com; } server { listen 80; location / { proxy_set_header Host $host; proxy_pass725 bytes (26 words) - 22:52, 21 March 2021
- Sphinx static files (category Pages using deprecated source tags)Sphinx provides the _static directory for css, javascript, etc. ${PROJECT}/_static/ css/*.css js/*.js html_static_path = ['_static'] html_css_files = ['css/custom544 bytes (31 words) - 22:03, 2 May 2021
- Python mysql-python (category Pages using deprecated source tags)WARNING: mysql-python only supports python2. See python pymysql instead. (as a bonus, it's actually easier to install) ## Conect to Database import MySQLdb759 bytes (95 words) - 20:52, 6 May 2018
- Python zipfile (category Pages using deprecated source tags)interact with zipfiles with zipfile.ZipFile('/path/file.zip', 'w') as archive: for (root, filenames, dirnames) in os.walk('/some/path'): root = root.replace('\\'939 bytes (83 words) - 15:02, 27 January 2020
- Ruby interpreters (category Pages using deprecated source tags)Coloured interpreter with autocomplete. pry # start pry interpreter ruby -r pry -e 'binding.pry' # start pry interpreter from specific ruby interp See820 bytes (82 words) - 14:50, 10 April 2020
- Encfsmp (category Pages using deprecated source tags)network share, and instruct encfsmp to use that. # temporarily mount share, we want to remember credentials NET USE x: \\<hostname>\share /USER:<user> <password>653 bytes (87 words) - 16:11, 5 October 2020
- Python keyring (category Pages using deprecated source tags)Library and commandline tool that abstracts linux/windows/macos keyrings to save/retrieve passwords. sudo pacman -S python-keyring # set password (interactive)677 bytes (42 words) - 01:24, 4 June 2020
- Gpg keyservers (category Pages using deprecated source tags)Keyservers allow you to share your public keys, so that others can encrypt messages intended for you. gpg --send-keys keyname # upload key to keyserver435 bytes (41 words) - 01:02, 5 June 2020
- Mutt smtp (category Pages using deprecated source tags)Mutt can send emails itself. # ~/.mutt/muttrc set ssl_force_tls = yes set smtp_url = "smtps://<your_email>@smtp.gmail.com:465/" set smtp_pass = "`<com824 bytes (80 words) - 22:27, 1 January 2021
- Jwt (category Pages using deprecated source tags)JSON web tokens are a way of authenticating users. All registered claims { "iss": "server.domain.com", // issuer(optional): principal of issuer (generally1 KB (69 words) - 20:50, 8 October 2019
- Java junit 4 (category Pages using deprecated source tags)WARNING: This is no longer the latest version of Junit import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite;536 bytes (22 words) - 16:33, 3 May 2019
- Ruby job-iteration (category Pages using deprecated source tags)Rails ActiveJob middleware to enable cursor-based iterated jobs. https://github.com/Shopify/job-iteration # https://github.com/Shopify/job-iteration/b329 bytes (36 words) - 22:02, 18 February 2021
- Python-digitalocean usage (category Pages using deprecated source tags)which returns objects representing other types (ex: Droplet). You can also use the types directly for resource creation. # show droplets import digitalocean667 bytes (86 words) - 16:14, 26 July 2020
- Viml platform (category Pages using deprecated source tags)See :help feature-list for full list of platforms if has('gui_running') " If running gvim if has('unix') " If running on *nix if has('win32') " If running760 bytes (79 words) - 21:12, 21 August 2020
- Ruby iterators (category Pages using deprecated source tags)iterators and codeblocks mylist = ["dog", "cat", "bear"] mylist.each { |x| puts x } # print each entry in 'mylist' Similar to a function my_codeblock =744 bytes (79 words) - 15:54, 29 October 2022
- Grep (category Pages using deprecated source tags)Search file contents. grep <dir> \ -C3 `# show 3x lines before/after each match` \ -l `# show only matched files` \ -i `# case insensitive search` \ -v1 KB (92 words) - 02:08, 19 July 2021
- Kitty (category Pages using deprecated source tags)A featureful gpu accelerated terminal emulator. clear_all_shortcuts yes macos_option_as_alt yes macos_quit_when_last_window_closed yes enable_audio_bell742 bytes (59 words) - 14:30, 15 January 2024
- Nginx rewrite urls (category Pages using deprecated source tags)URLs (not domains) using rules. It does so using simple PCRE regex expressions. location / { # redirect /nginx-tutorial? to /somePage.html rewrite ^/nginx-tutorial475 bytes (51 words) - 21:50, 21 March 2021
- Ack (category Pages using deprecated source tags)ages/ --ignore-dir=tests/ --ignore-file=is:ctags # exact filename match 'tags'1 KB (119 words) - 06:38, 19 July 2021
- Sphinx sphinx-markdown-tables (category Pages using deprecated source tags)compatible with docutils. pip install sphinx-markdown-tables # ${PROJECT}/source/conf.py extensions = ['sphinx_markdown_tables'] | Desc | Url | |------|678 bytes (32 words) - 13:19, 28 February 2021
- Lsyncd (category Pages using deprecated source tags)with the sync jobs you would like to start. sync { default.rsync, source = '/home/vagrant/progs/maya/m2014', target = '/devsync/mfw/scripts', exclude =694 bytes (64 words) - 02:14, 14 May 2021
- Nftables usage (category Pages using deprecated source tags)to write a file. You can even split your rules withing multiple files and source them. nft list tables # list tables nft list table 'inet' 'my_table' # list967 bytes (103 words) - 14:50, 13 March 2022
- Alsa (category Pages using deprecated source tags)headphone jack is not recognized using this audiocard. Proprietary Drivers are only available for the rev1.1 motherboard. You can use hda-jack-retask to remap1 KB (99 words) - 17:28, 30 January 2021
- Jail troubleshooting (category Pages using deprecated source tags)custom dev ruleset. I believe I solved this with custom udev rules while using wireguard Create/replace /etc/resolv.conf nameserver 192.168.1.1425 bytes (42 words) - 00:00, 22 February 2021
- Xorg usage (category Pages using deprecated source tags)'anybody' rm ~/.Xauthority touch ~/.Xauthority # Xorg will rebuild Xauthority using default perms startx /usr/bin/i3 # choose Xsession you want to start You1 KB (107 words) - 00:14, 17 July 2021
- Ruby conditionals (category Pages using deprecated source tags)capacity over several conditions. Each expression is compared against the value using the === operator. case capacity when 0 # exact match "..." when 50, 100 #1 KB (102 words) - 15:50, 14 May 2022
- Fail2ban install (category Pages using deprecated source tags)HOST system. If an IP gets blocked in a jail, it's blocked on the host. Using 'pfctl -t <talbename> -T show' demonstrates the shared rules. Instead, I882 bytes (122 words) - 00:57, 27 April 2020
- Virt-viewer (category Pages using deprecated source tags)Standard libvirt viewer. Also see spice . sudo pacman -S virt-viewer No install required remote-viewer spice://127.0.0.1:${SPICE_PORT} & disown remote-viewer957 bytes (68 words) - 14:46, 24 November 2019
- Python ipdb (category Pages using deprecated source tags)ipdb is an enhanced version of pdb. Some advantages: syntax highlighting tab-completion view entire file (not just snippet) sudo pip install ipdb All of532 bytes (39 words) - 18:17, 15 February 2019
- Javascript variables (category Pages using deprecated source tags)execute-context-scoped: # variable scoped to function, or module if not defined in function block-scoped: # variable scoped to the { ... } contents var1 KB (106 words) - 12:09, 5 February 2023
- Win3wm (category Pages using deprecated source tags)tiling window manager for windows, inspired by i3. Install visualstudio 16 (2019). vs_community.exe --passive ^ --add Microsoft.VisualStudio.Workload.VCTools1 KB (84 words) - 04:17, 3 March 2021
- Cpp loops (category Pages using deprecated source tags)// init vars // // exit-condition // // operation // for ( n=0, i=100 ; n!=i ; ++n, --i ) { // whatever here... } arrays int items[] = {11, 14, 25}; std::for_each(int914 bytes (75 words) - 07:57, 22 February 2019
- Ruby optparse (category Pages using deprecated source tags)Optparse is a basic commandline parser for ruby. It is builtin to the standard library. require 'optparse' options = {} OptionParser.new do |opt| opt.on("-i"680 bytes (63 words) - 16:44, 29 October 2022
- Viml conditionals (category Pages using deprecated source tags)WARNING: in vim, 0 is FALSE, and 1 is TRUE. WARNING: comparing mis-matching types will return FALSE " If Statement if var == 1 echo var elseif var == 2557 bytes (60 words) - 03:03, 11 February 2023
- Pihole configuration (category Pages using deprecated source tags)configuration combines dnsmasq with it's own customization layers. # set pihole to use opendns pihole -a setdns 208.67.222.222,208.67.220.220 # update blocked domain895 bytes (46 words) - 01:38, 19 January 2024
- OSX CLI (category Pages using deprecated source tags)By default OSX uses the BSD-variations of the coreutils. sudo shutdown -h now # shutdown right away sudo scutil --set HostName <yourhostname> # set hostname749 bytes (77 words) - 03:05, 25 November 2019
- Freebsd rc usage (category Pages using deprecated source tags)sshguard_enable="YES" sshguard_whitelist="/etc/sshguard.whitelist" You can also use sysrc to programmatically access and control these variables, even append873 bytes (83 words) - 18:34, 22 October 2022
- Nvidia install (category Pages using deprecated source tags)Download/Install Install driver associated with kernel LTS kernel pacman -Rsd linux-headers # remove headers not associated with your kernel pacman -S1 KB (98 words) - 13:56, 9 May 2021
- Abook (category Pages using deprecated source tags)abook is a CLI contact manager. It is simple, gets the job done, and can be integrated into mutt. sudo pacman -S abook ## abook for arch has already been671 bytes (75 words) - 17:03, 29 December 2020
- Mysql client (category Pages using deprecated source tags)readability. SELECT * FROM sometable\G # also, you can use less as your pager pager less -SFX mysql uses gnu readline. To enable vi mode simply: linux, macos<=10841 bytes (76 words) - 22:36, 26 November 2020
- Ruby qless (category Pages using deprecated source tags)A Job Queue Manager/Executor for ruby with a web interface. Create a class to represent a job to be consumed. Jobs can have dependencies on other jobs670 bytes (54 words) - 16:37, 13 August 2020
- Csharp comments (category Pages using deprecated source tags)There are 3x types of comments in csharp. // inline comment /* multiline * long * comment */ In C#, docstrings are written above the item being documented885 bytes (84 words) - 20:40, 2 November 2019
- Javascript jsx (category Pages using deprecated source tags)closing element ` jsx`{js-expression}` // evaluate js expression You can also use JSX directly let box = <Box> { // .. } </Box>;846 bytes (56 words) - 00:47, 15 June 2021
- Polari (category Pages using deprecated source tags)GUI irc client. Designed with mobile in mind. Simpler mobile-friendly UI built overtop of empathy. sudo pacman -S polari sudo pacman -S empathy Polari894 bytes (46 words) - 17:47, 7 February 2021
- Bash conditionals (category Pages using deprecated source tags)if [[ "$var1" = "2" ]] ; then echo 'condition 1' elif [[ "$var1" = "3" ]] ; then echo 'condition2' else echo 'no conditions met' fi case $var in -h|--help)1 KB (99 words) - 19:23, 11 May 2018
- Java operators (category Pages using deprecated source tags)int x = 1 + 1; int x = 1 - 1; double x = 10 / 3; // returns 3.0 double x = 10.0f / 3.0f; // returns 3.3333333 double x = 10.0 / 3.0; // returns 3.3333333333333335947 bytes (107 words) - 16:35, 9 February 2019
- Git repositories (category Pages using deprecated source tags)creating a repository (to be synchronized to/from) cd /path/projectname git init --bare create a project (to work in, push/pull from repo) cd /path/projectname939 bytes (84 words) - 04:05, 5 February 2022
- Gnu date (category Pages using deprecated source tags)date formats the current date, or translates between date formats. You may also be interested in bsd date. pacman -S dateutils date -d 'last monday 2pm'502 bytes (57 words) - 21:55, 4 November 2023
- Vagrant: providers (category Pages using deprecated source tags)Archlinux: sudo pacman -S virtualbox-host-modules-arch Archlinux sudo pacman -S virtualbox-guest-modules-arch vagrant plugin install vagrant-libvirt E1 KB (74 words) - 12:13, 16 December 2019
- VimPlugin: VimChat (category Pages using deprecated source tags)XMPP chat within vim. I only ever used this once, but it does work. Cygwin install was straightforward except that the xmpppy python module was missing706 bytes (63 words) - 16:58, 14 February 2021
- SLIM login manager (category Pages using deprecated source tags)/usr/share/slim/themes/archlinux-soft-grey #THIS WON'T WORK IN XMONAD Slim no longer uses .xinitrc for loading xsessions. Instead it scans '/etc/X11/Sessions'. # ~/954 bytes (63 words) - 14:32, 14 March 2021
- Mutt urlview (category Pages using deprecated source tags)>"\t]*|www\.[-a-z0-9.]+)[^ .,;\t>">\):] COMMAND xdg-open %s # ~/.mutt/muttrc macro pager \cb <pipe-entry>'urlview'<enter> \ 'Follow links with urlview'863 bytes (46 words) - 15:07, 1 January 2021
- Python feedparser (category Pages using deprecated source tags)A python library for reading RSS feeds. Reading a Feed import feedparser data = feedparser.parse('/var/tmp/out.xml') data = feedparser.parse('https://rss889 bytes (87 words) - 16:30, 17 May 2021
- Archiso (category Pages using deprecated source tags)Instructions for building customized Archlinux install media. sudo pacman -S archiso mkdir ~/dev cp -Ra /usr/share/archiso/configs/releng ~/dev/archiso959 bytes (80 words) - 13:52, 14 March 2021
- VimPlugin: python-mode (category Pages using deprecated source tags)package for the most popular python extensions for vim. " use ALE or COC let g:pymode_lint = 0 " use standalone ropemode let g:pymode_rope = 0 let g:pymod701 bytes (50 words) - 20:28, 14 February 2021
- Python functional (category Pages using deprecated source tags)def above_ten(num): return num > 10 def below_fifteen(num): return num < 15 # solution-1 r = range(20) for f in (above_ten, below_fifteen): r = filter(f810 bytes (96 words) - 21:09, 15 November 2020
- Mutt khal (category Pages using deprecated source tags)needsterminal; Force attachments to use mailcap when pressing enter (default m). (Without this text/calendar files will show in pager, ignoring mailcap) # ~/.mutt/muttrc845 bytes (85 words) - 20:51, 29 December 2020
- Distributed Systems: Strategies (category Pages using deprecated source tags)(presentation-tier) -> (business-tier) -> (data tier) # react.js -> node.js -> cassandra Each server-app behaves like a non-distributed system. Data is969 bytes (67 words) - 16:20, 18 April 2021
- Postgresql plpg syntax (category Pages using deprecated source tags)postgres enables you to use pgsql or plsql script. I have barely used this, and only ever to compensate for items like roles which cannot use IF NOT EXISTS. \set565 bytes (83 words) - 13:05, 15 September 2019
- name = "You" # create template, and render it using locals template = ERB.new("hello <%= name %>") template.resuilt(binding) <!-- comment --> <%# comment %>949 bytes (61 words) - 02:07, 13 May 2022
- Bitlbee usage (category Pages using deprecated source tags)&bitlbee channel, do not use the / prefix for commands. Example help identify <password> # ... NOTE: does not apply to you if using znc Add server to ZNC1 KB (92 words) - 20:32, 26 July 2020
- Zfs backups (category Pages using deprecated source tags)dataset is having another server, and using zfs send. But if you're looking for a cheaper solution, you can use tar. # Create a snapshot of your dataset872 bytes (108 words) - 16:30, 2 July 2022
- Ergodox ez (category Pages using deprecated source tags)oryx configurator https://ergodox-ez.com/pages/oryx keyboards as ascii art https://www.asciiart.eu/computers/keyboards2 KB (81 words) - 14:27, 17 July 2021
- Powershell tricks (category Pages using deprecated source tags)com/questions/29583664/how-do-you-enable-powershell-to-interpret-ansi-color-codes-when-using-get-conten1 KB (138 words) - 04:02, 19 September 2018
- Python pytest-cov (category Pages using deprecated source tags)multiple directories, simply write multiple .coverage files, them combine them using coverage combine .coverage1 .coverage2 ... setup.cfg [aliases] test=pytest1 KB (81 words) - 13:03, 25 July 2019
- Emby (category Pages using deprecated source tags)emby is opensource software to stream your movies, tv, music etc. sudo pacman -S emby-server sudo systemctl enable/start emby-server # /etc/rc.conf em1 KB (47 words) - 02:26, 19 May 2021
- Vim registers (category Pages using deprecated source tags)Registers are basically clipboards named after alphabet characters Their contents are persisted between vim restarts. @" # unnamed register (yank, delete954 bytes (72 words) - 23:03, 13 May 2023
- Java javac (category Pages using deprecated source tags)javac is java's builtin compiler. You'll need to install a jdk to get javac. sudo pacman -S jdk-openjdk # archlinux sudo apt-get install java-devel # debian1 KB (121 words) - 23:00, 9 February 2019
- Ngx http gzip module (category Pages using deprecated source tags)/etc/nginx/nginx.conf http { gzip on; gzip_comp_level 9; gzip_proxied any; gzip_types application/json; # ... } By default, your payload will still be780 bytes (73 words) - 13:56, 27 February 2019
- Rtorrent (category Pages using deprecated source tags)# downloads dir session = # tempfiles? check_hash = yes # If cannot get sources, allow option for non-encrypted #encryption = allow_incoming,try_outgoing1 KB (126 words) - 13:41, 28 November 2020
- Ruby rails: notifications (category Pages using deprecated source tags)ActiveSupport::Notifications.subscribe("") do |name, started, finished, unique_id, data| puts name, started, finished, unique_id, data end # name: name1 KB (91 words) - 16:05, 6 April 2021
- Github api v4 (category Pages using deprecated source tags)curl \ -H "Content-Type: application/json" \ -H "Authorization: bearer ${token}" \ -X POST \ -d '{"query": "query {repository(owner: \"willjp\", name:1 KB (37 words) - 01:06, 27 November 2020
- Windows bootable usb (category Pages using deprecated source tags)Instructions to create a bootable windows usb NOTE: don't do this from linux. download the iso-builder utility. Run on windows and it will automate the798 bytes (99 words) - 04:22, 8 March 2020
- Nix tips and tricks (category Pages using deprecated source tags)The builtin functions docs are hard to search. Run to get a list, then search documentation here. from docs curl -L https://nixos.org/manual/nix/stable819 bytes (95 words) - 02:54, 28 February 2021
- Object Oriented Programming (category Pages using deprecated source tags)code-reuse Good OO Design favours composition over inheritance. Excellent sources of information988 bytes (89 words) - 14:17, 22 June 2019
- Ruby loops (category Pages using deprecated source tags)next # continue to next loop redo # redo current loop break # exit loop 3.times { puts "hi!" } 3.upto(10) { |i| puts i } ('a'..'e').each {|char| puts char1 KB (114 words) - 14:48, 29 October 2021
- Ruby debug (category Pages using deprecated source tags)Builtin ruby module, that provides an interactive debugger. Run the ruby interpreter in debugger mode. Stops before first line is run, presents debugging995 bytes (91 words) - 15:22, 23 November 2023
- Java jna (category Pages using deprecated source tags)(java native access) platform info, and access to various platform internals. It is similar to ctypes in python. <!-- https://mvnrepository.com/artifact/net687 bytes (43 words) - 14:03, 8 June 2019
- Samba configuration (category Pages using deprecated source tags)for 'smbguest' sudo smbpasswd -a smbguest # set password for smbguest (when used for samba)1 KB (138 words) - 03:09, 25 April 2021
- Chocolatey (category Pages using deprecated source tags)Chocolatey is a community-managed package manager for windows. ## Paste the following in cmd: @powershell -NoProfile -ExecutionPolicy unrestricted -Command1 KB (103 words) - 15:52, 27 August 2023
- Python qt: simple tools (category Pages using deprecated source tags)from PySide2 import QtGui, QtWidgets, QtCore import signal import sys def change_mousepos(): current_pos = QtGui.QCursor.pos() y_val = current_pos.y()689 bytes (89 words) - 01:33, 9 April 2020
- Clink (category Pages using deprecated source tags)clink is a port of gnu-readline's features to windows. oh yes. that means: vi-mode on the commandline control-l clear screen tab-completion more... ~/626 bytes (87 words) - 12:55, 19 September 2018
- Xorg install (category Pages using deprecated source tags)type exit to exit the x server If the screen goes black, you can blindly use a different virtual console (Ctrl+alt+F2) log in as root, and issue 'pkill1 KB (104 words) - 13:32, 27 June 2021
- Nodejs commandline (category Pages using deprecated source tags)Most cli related code resides in: process module console module node script.js foo bar baz process.argv // string array of cli args process.exit(1) //939 bytes (70 words) - 19:03, 27 September 2023
- User databases (category Pages using deprecated source tags)TODO: I have code for handling these in TMA repo. sudo useradd --create-home will # create user will, and home sudo useradd --system build # no home dir546 bytes (48 words) - 01:11, 14 August 2020
- Java beanshell (category Pages using deprecated source tags)environment export CLASSPATH=$CLASSPATH:/usr/share/java/bsh.jar # GUI (have not used) java bsh.Console # CLI java bsh.Interpreter java bsh.Interpreter file.java727 bytes (65 words) - 16:44, 19 April 2019
- Open software broadcaster studio (category Pages using deprecated source tags)Open Broadcaster Studio (OBS studio) for short is a multi platform screen recording software package. sudo pacman -S obs-studio Trailer: Settings - Video526 bytes (38 words) - 13:52, 16 July 2022
- Vagrant: usage (category Pages using deprecated source tags)vms vagrant destroy # delete vm Boxes are the base-install images that you use as a starting point for your vagrant install. vagrant box add freebsd/FreeBSD-111 KB (122 words) - 16:48, 15 December 2019
- Ttyplot (category Pages using deprecated source tags)plots data from stdin, directly on terminal. It is built with tools like ps, vmstat and others in mind. ttyplot only tracks a single resource in x/y. You544 bytes (37 words) - 21:43, 28 August 2020
- Rtv (category Pages using deprecated source tags)======== F2/F3 # cycle themes rtv --list-themes rtv --theme colorblind-dark Use your mailcap to determine how you'd like to view specific files.966 bytes (77 words) - 23:21, 29 December 2023
- Algorithms: binary search (category Pages using deprecated source tags)def find(data: List[Dict], id_: str): """ Search list-of-dicts for a dict with `id_` Args: data: ``(ex: [{'id_': '0bac5130b4464968a94c5641306b347e'},1 KB (102 words) - 16:39, 13 February 2021
- VimPlugin: vim-superman (category Pages using deprecated source tags)view/navigate syntax-highlighted manpages within vim, optionally use instead of man. :Man vim # table of contents within quickfix function ManToc() """870 bytes (67 words) - 19:03, 14 February 2021
- Karabiner (category Pages using deprecated source tags)Karabiner is a free program that allows you to bind custom actions to keypresses on macos. (like xmodmap for macos). brew install karabiner-elements Permissions941 bytes (75 words) - 16:07, 3 January 2021
- Tar (category Pages using deprecated source tags)tar is a tool to create compressed file archives. # uncompressed tar -cvf file.tar directory/ tar -cvf /out/file.tar \ -C /some/in/dir `# change directory1,014 bytes (127 words) - 04:29, 19 February 2023
- Universal code grep (category Pages using deprecated source tags)universal code grep (ucg) is a modern search and search replace tool. It is similar to ripgrep, but supports PCRE2 (lookahead/lookbehind, multiline, etc)496 bytes (38 words) - 02:08, 19 September 2020
- Dash (category Pages using deprecated source tags)Offline documentation viewer/aggregator. Abstracts documentation from several sources so that they can be viewed offline. This can then hook into your terminal639 bytes (31 words) - 16:38, 19 September 2020
- Sphinx syntax (category Pages using deprecated source tags)title <foo/bar>` # alternate title for link You can also use intersphinx to refer to other pages using :ref:. See https://www.sphinx-doc.org/en/master/usag1 KB (119 words) - 00:43, 26 May 2020
- Python coverage (category Pages using deprecated source tags)coverage # run coverage coverage run -m pytest coverage run \ --source path/A \ --source path/B \ --omit path/C coverage reports # combine coverage multiple1 KB (105 words) - 01:44, 25 January 2022
- Python pip (category Pages using deprecated source tags)ar-paypal.git@master pip list # list installed pip search <package> # deprecated import site site.getusersitedir() # pip install --user packages installed1 KB (112 words) - 02:34, 7 July 2023
- backports, rather than upgrading your whole system. # /etc/apt/sources.list # configure backpourts source deb http://backports.debian.org/debian-backports squeeze-backports1 KB (121 words) - 12:57, 14 March 2021
- Python setuptools: repositories (category Pages using deprecated source tags)http://pypi.python.org/pypi/mypackage/0.1.0 # on success, page accessible python setup.py sdist # create source dist python setup.py sdist upload -r pypi # upload921 bytes (103 words) - 18:13, 3 August 2020
- Zsh plugin: zsh-autosuggestions (category Pages using deprecated source tags)displays first completion as you type. Install using zsh antigen. # colour of preview text ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE=8 # do not try to complete lines942 bytes (72 words) - 22:36, 30 December 2020
- Bluez (category Pages using deprecated source tags)Required for Xbox One Controller. The following is temporary, make permanent using sysfs. temporary sudu -i echo 1 > /sys/module/bluetooth/parameters/disable_ertm2 KB (113 words) - 15:56, 12 June 2021
- Zsh completion configuration (category Pages using deprecated source tags)fpath=(~/.zsh/completion $fpath) # add completion dir to $fpath autoload -U compinit # init autocompletion compinit The cleanest way to reload your autocompletion1 KB (61 words) - 23:57, 28 December 2021
- Spice (category Pages using deprecated source tags)to virtual machines. sudo pacman -S spice-gtk virt-viewer Go to downloads page (https://www.spice-space.org/download.html) and install: spicy # gui-chooser1 KB (105 words) - 14:51, 24 November 2019
- Else Heart.Break() Tram Schedule (category Pages using deprecated source tags)trams stop for ~8min (8s in real time). it is not clear yet if this schedule is consistent day-to-day. See detailed map: https://www.gamepretty.com/el723 bytes (101 words) - 02:38, 9 January 2023
- Pcsx2 (category Pages using deprecated source tags)sudo pacman -S pcsx2 Install bios to ~/.config/PCSX2/bios. See /mnt/games/PS2/__bios__. You'll also need to adjust the plugins libgsnull renders as a black1 KB (94 words) - 16:38, 21 May 2018
- Java attributes (category Pages using deprecated source tags)See java modifiers for more details. class MyClass { int number = 0; static int cls_num = 10; final int maxhealth = 10; // attempts to change value raise1 KB (131 words) - 20:11, 9 February 2019
- Java datetime (category Pages using deprecated source tags)import java.time.LocalDateTime; import java.time.ZoneOffset; LocalDateTime dt = LocalDateTime.now(); // current datetime (localtz) LocalDateTime dt_utc1 KB (139 words) - 22:47, 9 February 2019
- Ruby environments (category Pages using deprecated source tags)Describe and build environments to run ruby code. mkdir myproject && cd myproject echo 2.6.5 > .ruby-version # set 'chruby' ruby version bundle init #1,003 bytes (95 words) - 16:25, 9 January 2023
- Couchbase lite c (category Pages using deprecated source tags)A C implementation of couchbase lite with bindings for python, nim, and rust. An alternative implementation of couchbase-lite (couchbase only supports799 bytes (70 words) - 19:05, 11 February 2021
- Python web (category Pages using deprecated source tags)import urllib # split url into parts urllib.parse.urlparse('http://domain.com/resource/path;params?q=foo&bar=baz#fragment') >>> urllib.parse.ParseResult(1 KB (130 words) - 03:16, 30 January 2021
- Sqlite client (category Pages using deprecated source tags)SQLite uses SQL. sqlite3 # in-memory db sqlite3 new.db # open/create db You can add sqlite commands to your sqliterc. # ~/.sqliterc .mode column .header1 KB (94 words) - 17:03, 12 February 2021
- Bitlbee discord: usage (category Pages using deprecated source tags)NOTE: you can connect to multiple discord accounts simultaneously account list " list all accounts For more details, see bitlbee discord: configuration1 KB (109 words) - 02:48, 26 August 2023
- Divinity Original Sin (category Pages using deprecated source tags)experience: - enemies are finite, be very careful with how you spend experience. hoard exp any chance you get. movement speed: - remove equipment/items1 KB (57 words) - 19:22, 12 June 2021
- Mw2html (category Pages using deprecated source tags)A tool to create a static-html copy of a MediaWiki website with working links (but no css, no search). # Install htmldata cd /home/will/dev # Install htmldata904 bytes (100 words) - 14:01, 12 June 2022
- Nix troubleshooting (category Pages using deprecated source tags)Skip the AUR package and use official installer. nix-store --gc nix-store --verify nix-channel --update First, try updating your channel and rebuilding976 bytes (110 words) - 20:35, 3 July 2021
- Logrotate (category Pages using deprecated source tags)logrotate is a program to rotate/compress logs. pkg install logrotate # FreeBSD pacman -S logrotate # Archlinux /var/log/messages { rotate 5 weekly postrotate1 KB (100 words) - 19:49, 11 July 2020
- Amethyst (category Pages using deprecated source tags)brew cask install amethyst Config > System and Preferences > Security & Privacy: (Tab) Privacy: Accessibility: - [+] /Applications/amethyst Defaults mod12 KB (155 words) - 00:33, 24 March 2020
- Powershell config (category Pages using deprecated source tags)The powershell has an rcfile, just like a real shell. type $profile to see where your shell is reading it from. # install powershell readline module Install-Module1 KB (133 words) - 03:40, 19 September 2018
- Msmtp (category Pages using deprecated source tags)msmtp is a simple smtp server. SMTP servers are used to send mail. sudo pacman -S msmtp touch ~/.msmtprc chmod 600 ~/.msmtprc # send test message echo1 KB (72 words) - 22:13, 1 January 2021
- Python pyjwt (category Pages using deprecated source tags)pyjwt tokens are used for token-based authentication. they are stateless. import jwt secret = 'my-serverside-secret' data = { "iss": "auth.domain.com"1 KB (102 words) - 12:15, 29 March 2019
- Ffmpeg (category Pages using deprecated source tags)ffmpeg <global-flags> \ <inputfile flags> -i /path/to/file.mov \ <inputfile flags> -i /path/to/file.mov \ <outputfile flags> /path/to/outputfile.mov Concat1 KB (105 words) - 00:47, 23 July 2021
- Wine microsoft office (category Pages using deprecated source tags)~2015 and are likely out of date. It was considerably less effort just to use libre office, which is available everywhere. ### add 32 bit prefix to wine:457 bytes (58 words) - 16:17, 9 March 2019
- Boto3 cloudwatch (category Pages using deprecated source tags)CloudWatch is AWS's notifications/alarms system. import boto3 session = boto3.session.Session() client = session.client( 'cloudwatch', region_name='us-east-1'1 KB (132 words) - 20:43, 13 March 2019
- Bash datetime (category Pages using deprecated source tags)WARNING: Date is not a feature of bash, but part of the gnu or bsd coreutils. That means that it is not as portable as you might like. gnu-coreutils date577 bytes (61 words) - 23:24, 11 May 2018
- LXDM (category Pages using deprecated source tags)official repos. NOTE: LXDM does not seem to have any official docs, nor a man page. sudo pacman -S lxdm pacaur -S lxdm-themes sudo systemctl enable lxdm /etc/lxdm/lxdm1,001 bytes (67 words) - 17:03, 26 September 2019
- Python pyjsgf (category Pages using deprecated source tags)python library to interact with JSGF files. import jsgf # add rules to a grammar grammar = jsgf.Grammar() rule = jsgf.PublicRule('direction', jsgf.AlternativeSet('up'1 KB (108 words) - 16:17, 28 September 2019