Skip to content

Instantly share code, notes, and snippets.

View aLekSer's full-sized avatar
🏯
Building

Alexander Apalikov aLekSer

🏯
Building
View GitHub Profile
# find the IP addresses of many hosts on the network
# step 1. obtain the broadcast address from ifconfig
# step 2. ping the broadcast address
$ ifconfig -a | grep broadcast
inet 192.168.1.102 netmask 0xffffff00 broadcast 192.168.1.255
inet 192.168.68.1 netmask 0xffffff00 broadcast 192.168.68.255
inet 192.168.174.1 netmask 0xffffff00 broadcast 192.168.174.255
$ ping 192.168.1.255
PING 192.168.1.255 (192.168.1.255): 56 data bytes
64 bytes from 192.168.1.1: icmp_seq=0 ttl=64 time=0.634 ms
@akremsa
akremsa / diagram.mmd
Last active October 15, 2020 11:35
OM Design Diagram
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@miguelmota
miguelmota / logrus_hooks.go
Last active September 7, 2021 07:27
Golang Logrus show filename and line number
package logger
import (
"fmt"
"path"
"runtime"
"github.com/sirupsen/logrus"
)
@carolynvs
carolynvs / .gitconfig
Last active October 19, 2022 14:44
git wip - Show what branches you have been working on lately
[alias]
wip = for-each-ref --sort='authordate:iso8601' --format=' %(color:green)%(authordate:relative)%09%(color:white)%(refname:short)' refs/heads
@mnutt
mnutt / example.md
Last active December 27, 2023 14:10
TreeStyleTab sidebar tabs only

Example:

firefox

@chrislkeller
chrislkeller / import_json_appsscript.js
Last active March 25, 2024 19:45
Adds what amounts to an =ImportJSON() function to a Google spreadsheet... To use go to Tools --> Script Editor and add the script and save.
/**
* Retrieves all the rows in the active spreadsheet that contain data and logs the
* values for each row.
* For more information on using the Spreadsheet API, see
* https://developers.google.com/apps-script/service_spreadsheet
*/
function readRows() {
var sheet = SpreadsheetApp.getActiveSheet();
var rows = sheet.getDataRange();
var numRows = rows.getNumRows();
@jo
jo / js-crypto-libraries.md
Last active March 31, 2024 20:33
List of JavaScript Crypto libraries.

JavaScript Crypto Libraries

List some crypto libraries for JavaScript out there. Might be a bit out dated. Scroll to the bottom.

WebCryptoAPI

http://www.w3.org/TR/WebCryptoAPI/

This specification describes a JavaScript API for performing basic cryptographic operations in web applications, such as hashing, signature generation and verification, and encryption and decryption. Additionally, it describes an API for applications to generate and/or manage the keying material necessary to perform these operations. Uses for this API range from user or service authentication, document or code signing, and the confidentiality and integrity of communications.

@zsup
zsup / ddd.md
Last active April 17, 2024 14:35
Documentation-Driven Development (DDD)

Documentation-Driven Development

The philosophy behind Documentation-Driven Development is a simple: from the perspective of a user, if a feature is not documented, then it doesn't exist, and if a feature is documented incorrectly, then it's broken.

  • Document the feature first. Figure out how you're going to describe the feature to users; if it's not documented, it doesn't exist. Documentation is the best way to define a feature in a user's eyes.
  • Whenever possible, documentation should be reviewed by users (community or Spark Elite) before any development begins.
  • Once documentation has been written, development should commence, and test-driven development is preferred.
  • Unit tests should be written that test the features as described by the documentation. If the functionality ever comes out of alignment with the documentation, tests should fail.
  • When a feature is being modified, it should be modified documentation-first.
  • When documentation is modified, so should be the tests.

Demo:

Spoiler warning

Spoiler text. Note that it's important to have a space after the summary tag. You should be able to write any markdown you want inside the <details> tag... just make sure you close <details> afterward.

console.log("I'm a code block!");
@jamtur01
jamtur01 / ladder.md
Last active April 28, 2024 20:07
Kickstarter Engineering Ladder