Class names are CamelCase
.
Methods and variables are snake_case
.
Methods with a ?
suffix will return a boolean.
:- module(core, | |
[ % Operational semantics | |
eval/2, % +Expr, -VExpr | |
quote/2, % +VExpr, -Expr | |
normalise/2, % +Term, -Term | |
eval/3, % +Env, +Expr, -VExpr | |
quote/3, % +Len, +VExpr, -Expr | |
normalise/3, % +Env, +Term, -Term |
echo "" | |
echo "************ Github Dork Links (must be logged in) *******************" | |
echo "" | |
echo " password" | |
echo "https://github.com/search?q="hackertarget.site"+password&type=Code" | |
echo "https://github.com/search?q=""hackertarget""+password&type=Code" | |
echo "" | |
echo " npmrc _auth" |
# activerecord-3.0.0/lib/active_record/connection_adapters/mysql_adapter.rb | |
# Maps logical Rails types to MySQL-specific data types. | |
def type_to_sql(type, limit = nil, precision = nil, scale = nil) | |
return super unless type.to_s == 'integer' | |
case limit | |
when 1; 'tinyint' | |
when 2; 'smallint' | |
when 3; 'mediumint' | |
when nil, 4, 11; 'int(11)' # compatibility with MySQL default |
# In this example I make difference for 3 urls, this can be messy if you have an URL that is like /posts/whatever/contacts because there is 2 places that will return True (2nd and 3rd li) | |
# So here is the better option for handling this: | |
{% with request.resolver_match.url_name as url_name %} | |
<ul id="menu"> | |
<li class="{% if url_name == 'home' %}active{% endif %}">Home</li> | |
<li class="{% if url_name == 'blog' %}active{% endif %}">Posts</li> | |
<li class="{% if url_name == 'contact' %}active{% endif %}">Contact</li> | |
</ul> |
# CLI | |
sudo apt update -y | |
sudo apt install -y \ | |
git curl \ | |
docker.io docker-buildx \ | |
build-essential pkg-config autoconf bison rustc cargo clang \ | |
libssl-dev libreadline-dev zlib1g-dev libyaml-dev libreadline-dev libncurses5-dev libffi-dev libgdbm-dev libjemalloc2 \ | |
libvips imagemagick libmagickwand-dev mupdf mupdf-tools \ | |
redis-tools sqlite3 libsqlite3-0 libmysqlclient-dev \ | |
rbenv apache2-utils |
#!/usr/bin/env bash | |
# Abort sign off on any error | |
set -e | |
# Start the benchmark timer | |
SECONDS=0 | |
# Repository introspection | |
OWNER=$(gh repo view --json owner --jq .owner.login) |
#!/bin/sh | |
# Automatic SSH jump host for IPv6-only hosts. | |
# Usage in ~/.ssh/config: ProxyCommand ~/.ssh/ipv6proxy <jumphost> %h %p | |
# If a host is reachable via IPv6, a direct connection is made. | |
# Otherwise a jump host is used (which shall support IPv6). | |
if ping6 -c1 $2 >/dev/null 2>&1; then | |
exec nc -6 $2 $3 | |
else | |
exec ssh -q $1 "nc -6 $2 $3" |
#ifdef OLED_ENABLE | |
// Rotate OLED | |
oled_rotation_t oled_init_user(oled_rotation_t rotation) { | |
return OLED_ROTATION_90; | |
} | |
// Animation parameters | |
#define FRAME_DURATION 333 // How long each frame lasts in milliseconds |
using System.Collections.Generic; | |
/// <summary>A Kalman filter implementation for <c>float</c> values.</summary> | |
public class KalmanFilterFloat { | |
//----------------------------------------------------------------------------------------- | |
// Constants: | |
//----------------------------------------------------------------------------------------- | |
public const float DEFAULT_Q = 0.000001f; |