These are my installation-tricks and notes for running Linux on a 2021 Thinkpad
P14s Gen2 with AMD Ryzen 7 5850U. It should also be suitable for the Thinkpad T14 Gen2 AMD as they are technically the same modell.
Meanwhile there is also a good test on youtube and an entry in the arch-wiki, which also comments some points mentioned here.
@ECHO OFF | |
REM Example: Cmder.bat vim hello_world.c | |
REM will run vim hello_world.c inside Cmder | |
REM Note Add following line at the end of init.bat (without REM) | |
REM @if not "%*" == "" %* | |
SET "CMDER_ROOT=%~dp0" | |
IF "%ConEmuDir%" == "" SET "ConEmuDir=%CMDER_ROOT%\vendor\conemu-maximus5" | |
START "" "%ConEmuDir%\ConEmu.exe" /Icon "%CMDER_ROOT%\icons\cmder.ico" /Title Cmder /LoadCfgFile "%CMDER_ROOT%\config\ConEmu.xml" /cmd cmd /k ""%ConEmuDir%\..\init.bat" %*" -new_console:d:%USERPROFILE% |
# If you are using the MySQL 5.6 version of mysqldump on an older MySQL database, you might get the error message. | |
mysqldump: Couldn't execute 'SELECT @@GTID_MODE': Unknown system variable 'GTID_MODE' (1193) | |
# This error is in part due to the introduction of Global Transaction Identifiers (GTIDs) in MySQL 5.6. GTIDs make it simple to # track and compare replication across a master-slave topology. | |
# mysqldump tries to query this system variable, which doesn’t exist in earlier versions, and then fails. The solution is to add # –set-gtid-purged=OFF in the mysqldump command. It should look something like | |
mysqldump -h dbHost -u dbuser dbName --set-gtid-purged=OFF |
# Send a native logstash json event to the logstash server | |
$template ls_json,"{%timestamp:::date-rfc3339,jsonf:@timestamp%,\"@message\":\"%msg:::json%\",\"@fields\":{%fromhost:::jsonf:host%,%syslogfacility-text:::jsonf:syslog_facility%,%syslogfacility:::jsonf:syslog_facility_code%,%syslogseverity-text:::jsonf:syslog_severity%,%syslogseverity:::jsonf:syslog_severity_code%,%app-name:::jsonf:program%,%procid:::jsonf:pid%}}" | |
*.* @@mylogstashhost:5543;ls_json |
A lot of times you are developing a web application on your own laptop or home computer and would like to demo it to the public. Most of those times you are behind a router/firewall and you don't have a public IP address. Instead of configuring routers (often not possible), this solution gives you a public URL that's reverse tunnelled via ssh to your laptop.
Because of the relaxation of the sshd setup, it's best used on a dedicated virtual machine just for this (an Amazon micro instance for example).
#!/bin/bash | |
rm -f ./mux.sql; | |
rm -f ./tmp.list; | |
RES=`echo ""` | |
ITEM=`echo ""` | |
for file in `git ls-files` | |
do | |
HASH=`git rev-list HEAD $file | tail -n 1` | |
DATE=`git show -s --format="%ct" $HASH --` | |
ITEM=$(printf "%s %s\n" $DATE $file >> tmp.list) |
<?php | |
use \Nette\Utils\Json; | |
/** | |
* Minimalistic Google OAuth2 connector | |
* @author Mikuláš Dítě | |
* @license BSD-3 | |
*/ | |
class Google extends Nette\Object |
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
<?php | |
/** | |
* Command building and execution | |
* | |
* Most methods implement a "fluent interface" for easy method call chaining. | |
* | |
* @see http://pollinimini.net/blog/php-command-runner/ | |
* @author Iván -DrSlump- Montes <[email protected]> | |
* @license BSD |