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