Skip to content

Instantly share code, notes, and snippets.

@HugsLibRecordKeeper
HugsLibRecordKeeper / output_log.txt
Created Jun 24, 2021
Rimworld output log published using HugsLib
View output_log.txt
Log uploaded on Thursday, June 24, 2021, 9:18:53 PM
Loaded mods:
Harmony(brrainz.harmony)[mv:1.0.4.0]: 0Harmony(2.0.2), HarmonyMod(1.0.4)
Core(Ludeon.RimWorld): (no assemblies)
Multiplayer(rwmt.Multiplayer): 0MultiplayerAPI(av:0.3.0,fv:0.3.0), I18N(4.0.0 [no FileVersionInfo]), I18N.West(4.0.0 [no FileVersionInfo]), Iced(1.7.0), Ionic.Zip.Reduced(1.9.1.8), LiteNetLib(1.0.0), Multiplayer(av:0.5.3,fv:0.3.0), RestSharp(av:106.0.0,fv:106.10.1)
HugsLib(UnlimitedHugs.HugsLib)[ov:8.0.1]: 0Harmony(av:2.0.2,fv:1.2.0.1), HugsLib(av:1.0.0,fv:8.0.1)
EdB Prepare Carefully(EdB.PrepareCarefully)[mv:1.2.1]: 0Harmony(2.0.2), EdBPrepareCarefully(av:1.1.1,fv:1.2.1)
Save Our Ship 2(kentington.saveourship2): ShipsHaveInsides(0.0.0)
Alpha Ships(sarg.alphaships): (no assemblies)
Gunplay(automatic.gunplay): 0Harmony(2.0.2), Gunplay(1.0.379.18)
@shuyums2
shuyums2 / Dockerfile
Created Jun 24, 2021
Build image with passwordless SSH setup
View Dockerfile
FROM ubuntu:18.04
ENV SSH_PORT 2233
# 1. Install SSH
RUN apt-get update -y && \
apt-get install -y --no-install-recommends openssh-server && \
apt-get clean && apt-get purge && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# 2. Config SSHD to the passwordless
View gist:0538722ccec09df07e91211ba5e71b09
diff --git a/search_autocomplete.libraries.yml b/search_autocomplete.libraries.yml
index 7364e72..708ef37 100644
--- a/search_autocomplete.libraries.yml
+++ b/search_autocomplete.libraries.yml
@@ -7,4 +7,11 @@ search_autocomplete.admin.helper:
css/admin_helpers/search_autocomplete.admin.css: {}
dependencies:
- core/jquery
- - core/drupal
\ No newline at end of file
View untrusted-lvl1-solution.js
/*****************
* cellBlockA.js *
*****************
*
* Good morning, Dr. Eval.
*
* It wasn't easy, but I've managed to get your computer down
* to you. This system might be unfamiliar, but the underlying
* code is still JavaScript. Just like we predicted.
*
@damjes
damjes / sundaram.rb
Created Jun 24, 2021
Sundaram sieve
View sundaram.rb
# IT REALLY WORKS! CHECK IT!
def primes(limit)
limit /= 2
t = [true] * limit
t[0] = false
i = 0
k = 1
while i < limit
View get reserv
$('#get_price1').click(function(){
var ms_pair=['0x1b96b92314c44b159149f7e0303511fb2fc4774f',
'0xc15fa3e22c912a276550f3e5fe3b0deb87b55acd','0xc5b0d73a7c0e4eaf66babf7ee16a2096447f7ad6',
'0x680dd100e4b394bda26a59dd5c119a391e747d18','0xff17ff314925dff772b71abdff2782bc913b3575',
'0x3ab77e40340ab084c3e23be8e5a6f7afed9d41dc','0xd1f12370b2ba1c79838337648f820a87edf5e1e6',
'0xa0718093baa3e7aae054eed71f303a4ebc1c076f','0xebaaa639a55ecbebac4d7d43a5a6d7c5c1216a09',
'0x19e7cbecdd23a16dfa5573df54d98f7caae03019','0x4db28767d1527ba545ca5bbda1c96a94ed6ff242',
'0xba51d1ab95756ca4eab8737ecd450cd8f05384cf','0x7bb89460599dbf32ee3aa50798bbceae2a5f7f6a',
'0x83b92d283cd279ff2e057bd86a95bdefffed6faa','0x4d0228ebeb39f6d2f29ba528e2d15fc9121ead56',
'0x20bcc3b8a0091ddac2d0bc30f68e6cbb97de59cd','0x70d8929d04b60af4fb9b58713ebcf18765ade422',
@573
573 / readme.md
Created Jun 24, 2021
Make certain monitor the primary one in lxde
View readme.md

Primary meaning that where apps are opened when started.

Check for available connections names

xrandr

Screen 0: minimum 320 x 200, current 1920 x 2104, maximum 16384 x 16384 eDP-1 connected primary (normal left inverted right x axis y axis) . 2880x1620 59.96 + 50.00 . (...)

View simples.js
function calculadoraAdicaoSubtrcao(numero, outroNumero, operacao) {
// Verifica se a váriavel operação é diferente de "-" e "+",
// caso seja, é retornado zero pois a função só realiza some e subtração
if (operacao !== "-" && operacao !== "+") {
return 0;
}
// Se a a váriavel operação é igual a "+" retornamos o resultado da soma
if (operacao === "+") {
return numero + outroNumero;
@MeHigh9407
MeHigh9407 / PinToSafeArea.cs
Created Jun 24, 2021 — forked from SeanMcTex/PinToSafeArea.cs
Restrict Unity UI to an iPhone X or other Mobile Device's Safe Area
View PinToSafeArea.cs
using UnityEngine;
/// <summary>
/// Resizes a UI element with a RectTransform to respect the safe areas of the current device.
/// This is particularly useful on an iPhone X, where we have to avoid the notch and the screen
/// corners.
///
/// The easiest way to use it is to create a root Canvas object, attach this script to a game object called "SafeAreaContainer"
/// that is the child of the root canvas, and then layout the UI elements within the SafeAreaContainer, which
/// will adjust size appropriately for the current device./// </summary>
View conventional-commits.sh
#!/bin/sh
RED='\033[0;31m'
RESET='\033[0m'
UNDERLINE='\033[4m'
REGEX="^(revert|feat|fix|ci|chore|docs|test|style|refactor)(\(.+?\))?:.{1,}$"
if ! head -1 "$1" | grep -qE $REGEX; then
echo "${RED}Commit message invalid: please use conventional commits"