Skip to content

Instantly share code, notes, and snippets.

View ionescu77's full-sized avatar
🎯
Focusing

Răzvan Ionescu ionescu77

🎯
Focusing
View GitHub Profile
@KarthickSudhakar
KarthickSudhakar / kvm_export_import.sh
Last active March 14, 2024 05:45
Bash script to import and export KVM virtual machine
#!/usr/bin/env bash
# ----------------------------------------------------------------------------------------------------
# AUTHOR : KARTHICK S
# PURPOSE : THIS SCRIPT WILL EXPORT/IMPORT THE CONFIG AND VM DISK.
#
# usage:
# export function will take care of exporting the necessary for all VM. Run as "<scriptname.sh> export"
# import function will take care of importing the necessary for all VM. Run as "<scriptname.sh> import"
#
@entirelymagic
entirelymagic / SimpleHttpServer.py
Created January 18, 2022 10:42
Very simple HTTP server in python for logging requests
"""
KEONN - Very simple HTTP server in python for logging requests
Usage::
./server.py [<port>]
python3.9 httpServer.py 8000
"""
import sys
if str(sys.version)[0] == '3':
from http.server import BaseHTTPRequestHandler, HTTPServer
@trungvose
trungvose / nx-structure-angular-nestjs.md
Last active December 16, 2023 21:41
Nx workspace structure for NestJS and Angular

Nx

https://nx.dev/

Nx is a suite of powerful, extensible dev tools to help you architect, test, and build at any scale — integrating seamlessly with modern technologies and libraries while providing a robust CLI, caching, dependency management, and more.

It has first-class support for many frontend and backend technologies, so its documentation comes in multiple flavours.

Principles

@ggets
ggets / tbw.sh
Created February 14, 2021 15:00
Read TBW script for Samsung 860 Evo (and Pro) drives for Windows and Linux
#!/bin/bash
################################################################################
### TBW for Samsung SSD ###
### -by GGetsov ###
### ------------------------------------------------------------------------ ###
### Requires: Cygwin, bash (with arrays support), bc, smartctl ###
################################################################################
arrtest[0]="1"||(echo "Failure: arrays not supported in this version of bash."&&exit 2)
#var
ver="0.2.4"
@D4R4
D4R4 / l2tp_vpn_client
Created June 10, 2020 15:45
L2TP VPN Client setup on CentOS 7
Go step-by-step through following instructions to set up L2TP/IPSec VPN on Centos 7.
To set up the VPN client on centos 7, first install the following packages:
yum -y install epel-release
yum -y install strongswan xl2tpd
Create VPN variables (replace with actual values):
VPN_SERVER_IP='your_vpn_server_ip'
@pR0Ps
pR0Ps / unifi-update.sh
Last active September 24, 2022 19:10
Update a UniFi Controller installation on Alpine Linux
#!/bin/sh
####################################
# Update a UniFi Controller installation on Alpine Linux
#
# Assumes that the unifi service can be manipulated with "rc-service unifi <start/stop>"
#
# For initial installation see https://wiki.alpinelinux.org/wiki/UniFi_Controller
# Additional steps:
# - apk add --no-cache libc6-compat
@prudnikov
prudnikov / atomic_viewsets.py
Created December 17, 2019 09:55
Django Rest Framework Atomic ViewSet and Mixin.
from django.db import transaction
from rest_framework import mixins
from rest_framework.viewsets import GenericViewSet
__all__ = ['AtomicCreateModelMixin', 'AtomicUpdateModelMixin', 'AtomicDestroyModelMixin',
'AtomicModelViewSetMixin', 'AtomicModelViewSet']
class AtomicCreateModelMixin(mixins.CreateModelMixin):
<div class="row" style="margin-bottom: 12px;">
<div class="col-md-12" style="text-align: center;">
This page will refresh in <div class="time">{{minutes}}</div> Min <div class="time">{{seconds}}</div> Sec
</div>
</div>
@martinec
martinec / .gitignore.local for gitignore.io
Last active May 11, 2021 14:19
.gitignore.local for gitignore.io
git config --global alias.ignore-create '!gi() { \
if [ $# -eq 0 ]; then \
echo "Usage: git ignore-create list-item,...\n" ;\
echo "Avalaible list items:" ;\
curl -sL "https://www.gitignore.io/api/list" | tr -d "\n" ;\
echo "" ;\
else \
echo "# DO NOT EDIT THIS FILE" ;\
echo "# Put your local changes on .gitignore.local, then\n" ;\
echo "# To update type: git ignore-update" ;\
@vees
vees / Lenovo Thinkcentre M92P.txt
Last active July 30, 2023 05:46
Ubuntu and UEFI on Lenovo Thinkcentre M92P
Lenovo Thinkcentre M92P
When booting to USB installer disk installation proceeds as expected
1962 no operating system found
When booting into preview mode all disks load without issue, so its not the cable
Secure Boot option either not present or disabled
Last time I fixed this by adding a fake line to the boot loader from instructions on the web
Got a warning during installation about UEFI mode
Windows Fast Startup disabled
jfly comment below: