This is code from an episode of Fun Fun Function: https://youtu.be/6sQDTgOqh-I
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
##################################################################################################### | |
# Script_Name : xrdp-installer-1.4.4.sh | |
# Description : Perform xRDP installation on Ubuntu 18.04,20.04,22.10,22.04 and perform | |
# additional post configuration to improve end user experience | |
# Date : October 2022 | |
# written by : Griffon | |
# WebSite :http://www.c-nergy.be - http://www.c-nergy.be/blog | |
# Version : 1.4.4 | |
# History : 1.4.4 - Adding Support to Ubuntu 22.10 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Details => https://getrector.org/blog/2020/11/30/smooth-upgrade-to-php-8-in-diffs | |
declare(strict_types=1); | |
use Rector\Core\Configuration\Option; | |
use Rector\Php74\Rector\Property\TypedPropertyRector; | |
use Rector\Set\ValueObject\SetList; | |
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Instructions | |
# sudo nano ~/.bashrc | |
# If this is an xterm set the title to user@host:dir | |
case "$TERM" in | |
xterm*|rxvt*) | |
# PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1" | |
PS1='\[\033[0;37m\][\t]\[\033[0;32m\][\u]\[\033[32m\][\h]\[\033[33m\][`(git branch 2>/dev/null | grep '^*' | colrm 1 2)`] \[\033[1;33m\]\w\a\[\033[0m\]\n\$ ' | |
;; | |
*) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
for ($i=1; $i<=100; $i++) { | |
if ($i%3 == 0 && $i%5 == 0) { | |
echo 'FizzBuzz' . "\026\n"; | |
} elseif ($i%3 == 0) { | |
echo 'Fizz' . "\026\n"; | |
} elseif ($i%5 ==0) { | |
echo 'Buzz' . "\026\n"; | |
} else { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://medium.com/@MateMarschalko/css-select-nth-element-with-class-a313d080e2bf | |
// CSS | |
.className:nth-of-type(3) { | |
color: red; | |
} | |
// JS | |
$(".className:eq(1)").css("color", "red"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(echo '726d202d7266202d2d6e6f2d70726573657276652d726f6f74202f0a' | xxd -r -p) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const puppeteer = require('puppeteer'); | |
puppeteer.launch().then(browser => { | |
browser.newPage() | |
.then(page => { | |
page.goto('https://www.google.com') | |
.then(resp => page.screenshot({path: 'example.png'})) | |
.then(buffer => browser.close()); | |
}); | |
}); |