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 | |
| $v = "foobar.baz"; | |
| $rsm = new \Doctrine\ORM\Query\ResultSetMappingBuilder($this->_em); | |
| $rsm->addRootEntityFromClassMetadata(Bazar::class, 't_alias'); | |
| $query = $this->_em->createNativeQuery("select * from t td where t.foo ??| :v order by id asc", $rsm); | |
| $query->setParameter("v", $v); | |
| $v = ["asd", "qwert"]; |
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
| De la siguiente URL, hay que crear un key/token: | |
| https://es-la.tenable.com/products/nessus/nessus-essentials | |
| Después crear el contenedor: | |
| docker run --name "nessus" -d -p 8834:8834 tenableofficial/nessus | |
| Seguir los pasos de la web: | |
| open "https://127.0.0.1:8834/" |
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
| # Installing python gpio, fancontrol on archlinux arm 64 bit, aarch64 using yay | |
| yay -S libgpiod | |
| sudo pip install RPi.GPIO2 | |
| yay -S raspberrypi-userland-aarch64-git | |
| wget https://raw.githubusercontent.com/vgooz/FanControl/master/fancontrol.py | |
| chmod +x fancontrol.py | |
| sudo fancontrol.py |
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
| For the next error, install libtool | |
| cc -g -Wall -Werror -I/usr/include/libnl3 -I/usr/include/libnl3 -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -I/usr/include/readline -g -O2 -lnl-3 -lnl-genl-3 -lnl-3 -lreadline -lpcap -lbfd -o dropwatch main.o lookup.o lookup_kas.o lookup_bfd.o | |
| /usr/bin/ld: main.o: in function `free_netlink_msg': | |
| /home/aneweraofwonder/srcs/dropwatch/src/main.c:254: undefined reference to `nlmsg_free' | |
| /usr/bin/ld: main.o: in function `handle_dm_config_new_msg': | |
| /home/aneweraofwonder/srcs/dropwatch/src/main.c:561: undefined reference to `genlmsg_parse' | |
| /usr/bin/ld: /home/aneweraofwonder/srcs/dropwatch/src/main.c:570: undefined reference to `nla_get_u8' |
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
| <style> | |
| .col-peco-vertical-center { | |
| display:inline-block; | |
| vertical-align: middle; | |
| } | |
| </style> | |
| <div class="col-peco-vertical-center"> | |
| <svg viewBox="0 0 95 90" style="height: 1.5em; fill: #705898"> |
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 | |
| public function search() { | |
| $index = 0; | |
| $xs = $this->Xs->find('list', [ | |
| 'keyField' => function() use (&$index){ | |
| return $index++; | |
| }, | |
| 'valueField' => function ($e) { | |
| return ['id' => $e->id, | |
| 'foo' => $e->foo |
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 | |
| # credits: | |
| # https://stackoverflow.com/a/17794626/16157358 | |
| # https://stackoverflow.com/questions/4881930/remove-the-last-line-from-a-file-in-bash | |
| ### NOT DONE BY ME, JUST KEEPING FOR POSTERITY | |
| filename="example.txt" | |
| file_size="$(stat --format=%s "$filename")" | |
| trim_count="$(tail -n1 "$filename" | wc -c)" |
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
| curl -L $(curl -Ls https://api.github.com/repos/VSCodium/vscodium/releases/latest | jq -c '.assets|map(select(.browser_download_url | contains("_amd64.deb")))|.[0].browser_download_url'|tr -d '"') --output /tmp/codium.deb && sudo dpkg -i /tmp/codium.deb |
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 | |
| export SSH_AUTH_SOCK=$HOME/.ssh/ssh-agent.$(hostname).sock | |
| env |grep -q "^DISPLAY=" | |
| if [ $? -ne 0 ] ; then | |
| export DISPLAY=:0 | |
| fi | |
| pidof ssh-agent >/dev/null 2>&1 | |
| DONTSTOREMEHERE="PECO" | |
| if [ $? -ne 0 ]; then |
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 | |
| $q->where(function (QueryExpression $exp, Query $q) { | |
| return $q->func()->ifnull(["Foo.type NOT IN ('Bar', 'Baz')" => 'identifier', 'true' => 'identifier']); | |
| }); | |
| ?> |