Skip to content

Instantly share code, notes, and snippets.

View kevsersrca's full-sized avatar
🚀
Working from home

kev kevsersrca

🚀
Working from home
View GitHub Profile
@kevsersrca
kevsersrca / gist:5ba1e1cbf8e2befb367d27723a6ce95b
Created September 18, 2017 13:00
Proxmox KVM Shutdown VM quit/powerdown failed - got timeout
ps aux | grep "/usr/bin/kvm -id VMID"
kill -9 PID
qm start VMID
qm list
Virtualenv
sudo pip install virtualenv
or
sudo apt-get install python-virtualenv
in the project
virtualenv venv
. venv/bin/activate
after install Flask
class BinarySourceTree<T> where T:IComparable
{
/* BİNARY SOURCE TREE
___ ___________ ____
| | | |
| | | |
| | | |
| | | |
| | ROOT | |
| | | |
package main
import (
"encoding/xml"
"fmt"
"time"
"github.com/astaxie/beego/httplib"
)
@kevsersrca
kevsersrca / gist:1738cb9bbb130554899ed5adb4c728e7
Created December 10, 2017 12:50
Mysql new root create with remote connectedly
CREATE USER 'new_root'@'%' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON *.* TO new_root@'%' IDENTIFIED BY 'password' WITH GRANT OPTION MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0;
package main
import (
"encoding/json"
"fmt"
"io/ioutil"
"log"
"net/http"
"net/url"
"os"
@kevsersrca
kevsersrca / gist:877e8318c8684d953cbb496a300c7a8b
Last active January 5, 2018 10:46
virtualbox Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
CENTOS_BOX="serveit/centos-7"
UBUNTU_BOX="generic/ubuntu1710"
DEBIAN_BOX="generic/debian9"
SH_FILE="/root/install.sh"
@kevsersrca
kevsersrca / gist:013dec9e9aa006f31c2e6de6cfd564fd
Last active September 13, 2019 11:15
Kickstart Notes for Virtualization 😍
#version=RHEL7
# System authorization information
auth --enableshadow --passalgo=sha512
# Run the Setup Agent on first boot
firstboot --enable
ignoredisk --only-use=sda
# Keyboard layouts
keyboard --vckeymap=us --xlayouts='us'
# System language
@kevsersrca
kevsersrca / virt-install-centos
Created January 24, 2018 15:15 — forked from giovtorres/virt-install-centos
Install CentOS cloud images on KVM using cloud-init
#!/bin/bash
## **Updates to this file are now at https://github.com/giovtorres/kvm-install-vm.**
## **This updated version has more options and less hardcoded variables.**
# Take one argument from the commandline: VM name
if ! [ $# -eq 1 ]; then
echo "Usage: $0 <node-name>"
exit 1
fi
package main
import (
"fmt"
"math/big"
)
func fibonacci(x int) *big.Int {
fibo := make(map[int]*big.Int)
for i := 0; i <= x; i++ {