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
cd / | |
find . -name figma-linux_figma-linux.desktop 2>/dev/null | |
less ./var/lib/snapd/desktop/applications/figma-linux_figma-linux.desktop | |
cat ./var/lib/snapd/desktop/applications/figma-linux_figma-linux.desktop | |
ls -l ./var/lib/snapd/desktop/applications/figma-linux_figma-linux.desktop | |
sudo cp ./var/lib/snapd/desktop/applications/figma-linux_figma-linux.desktop ~/.local/share/applications | |
vim ~/.local/share/applications/mimeapps.list | |
xdg-mime default figma-linux_figma-linux.desktop x-scheme-handler/figma | |
xdg-mime query default x-scheme-hander/figma | |
cat /usr/share/applications/figma-linux.desktop || cat /var/lib/snapd/desktop/applications/figma-linux_figma-linux.desktop\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
K:=kubectl | |
NS:=default | |
.PHONY: migrate | |
migrate: | |
$(K) apply -f migration/migration-job.yaml -n $(NS) | |
$(K) wait --for=condition=complete --timeout=300s jobs/mlserver-migration -n $(NS) | |
$(K) get job mlserver-migration -o "jsonpath={.metadata.labels.controller-uid}" -n $(NS) \ | |
| xargs -I {} $(K) get po -l controller-uid={} -o "jsonpath={.items[0].metadata.name}" -n $(NS) \ | |
| xargs -I {} $(K) logs {} -n $(NS) -c mlserver-django \ |
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
apiVersion: batch/v1 | |
kind: Job | |
metadata: | |
name: mlserver-migration | |
spec: | |
parallelism: 1 | |
template: | |
spec: | |
containers: | |
- name: cloudsql-proxy |
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
class PlanViewset(viewsets.ModelViewSet): | |
class Schema(AutoSchema): | |
def get_operation(self, path, method): | |
op = super().get_operation(path, method) | |
if method == "GET" and path.split('/')[-2] != '{id}': | |
op['parameters'].append({ | |
"name": "time_window_id", | |
"in": "query", |
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
countries = [ | |
{'timezones': ['Europe/Andorra'], 'code': 'AD', 'continent': 'Europe', 'name': 'Andorra', 'capital': 'Andorra la Vella'}, | |
{'timezones': ['Asia/Kabul'], 'code': 'AF', 'continent': 'Asia', 'name': 'Afghanistan', 'capital': 'Kabul'}, | |
{'timezones': ['America/Antigua'], 'code': 'AG', 'continent': 'North America', 'name': 'Antigua and Barbuda', 'capital': "St. John's"}, | |
{'timezones': ['Europe/Tirane'], 'code': 'AL', 'continent': 'Europe', 'name': 'Albania', 'capital': 'Tirana'}, | |
{'timezones': ['Asia/Yerevan'], 'code': 'AM', 'continent': 'Asia', 'name': 'Armenia', 'capital': 'Yerevan'}, | |
{'timezones': ['Africa/Luanda'], 'code': 'AO', 'continent': 'Africa', 'name': 'Angola', 'capital': 'Luanda'}, | |
{'timezones': ['America/Argentina/Buenos_Aires', 'America/Argentina/Cordoba', 'America/Argentina/Jujuy', 'America/Argentina/Tucuman', 'America/Argentina/Catamarca', 'America/Argentina/La_Rioja', 'America/Argentina/San_Juan', 'America/Argentina/Mendoza', 'America/Argentina/Rio_Gallegos', 'America/Argentina/Ushuai |
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
FROM python:3.8-buster | |
RUN apt-get update && apt-get install -y --no-install-recommends openssh-server | |
RUN mkdir -p /run/sshd && mkdir -p /var/run/sshd && mkdir -p /root/.ssh | |
ARG PWD | |
RUN ssh-keygen -A | |
RUN echo "root:$PWD" | chpasswd | |
RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config | |
EXPOSE 22 |
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
export NAME=gurkha | |
conda create -n gurkha python=3.6 | |
conda activate gurkha | |
conda install opencv | |
pip install moviepy | |
pip install matplotlib | |
pip install jupyter | |
pip install jupyter_contrib_nbextensions | |
pip install nbextension install | |
jupyter contrib nbextension install |
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
# don't ask sudo password anymore for $USER. | |
sudo sh -c 'echo "$USER ALL=NOPASSWD:ALL" >> /etc/sudoers' | |
# broken volume due to windows effing | |
sudo ntfsfix /dev/sda8 | |
# information about GPU card | |
inxi -Gx | |
# information about nvidia driver installed |
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
/* | |
docker run --name=mysql1 -p 3306:3306 -d mysql/mysql-server:5.6 | |
docker logs mysql1 2>&1 | grep GENERATED | |
docker exec -it mysql1 mysql -uroot -p | |
*/ | |
set password=password('password'); | |
create user 'dbuser'@'%' identified by 'password'; | |
grant all privileges on *.* to 'dbuser'@'%' with grant option; |
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
/* ~/.config/gtk-3.0/gtk.css */ | |
VteTerminal, | |
TerminalScreen, | |
vte-terminal { | |
padding: 10px 10px 10px 10px; | |
-VteTerminal-inner-border: 10px 10px 10px 10px; | |
} |
NewerOlder