Skip to content

Instantly share code, notes, and snippets.

@farhad0085
farhad0085 / Deploy Django and React APP in a production VPS.md
Last active May 7, 2024 16:42
Deploy Django and React APP in a production VPS (Django + Celery + React + PostgreSQL + NGINX + Ubuntu Server)

Deploy Django and React APP in a production VPS (Django + React + PostgreSQL + NGINX + Ubuntu Server)

Assuming You have backend and frontend codes in /home/backend and /home/frontend/ (Use git to upload)

Install required Packages from the Ubuntu Repositories

sudo apt-get update
sudo apt-get install python3-pip python3-dev libpq-dev postgresql postgresql-contrib nginx
@WitherOrNot
WitherOrNot / winxp_act.ipynb
Created June 2, 2023 07:25
All the code you need to activate Windows XP w/o WPA bypasses
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bartholomej
bartholomej / css-media-queries-cheat-sheet.css
Last active May 7, 2024 16:41
CSS Media Query Cheat Sheet (with Foundation)
/*------------------------------------------
Responsive Grid Media Queries - 1280, 1024, 768, 480
1280-1024 - desktop (default grid)
1024-768 - tablet landscape
768-480 - tablet
480-less - phone landscape & smaller
--------------------------------------------*/
@media all and (min-width: 1024px) and (max-width: 1280px) { }
@media all and (min-width: 768px) and (max-width: 1024px) { }
@ArtisKrumins
ArtisKrumins / Fedora_DockerCE_Lando.md
Last active May 7, 2024 16:41
Fedora + Docker CE + Lando.md

Setting up Lando on Fedora 39

Update packages
sudo dnf -y update

Disable cgroups v2 in the kernel
sudo grubby --update-kernel=ALL --args="systemd.unified_cgroup_hierarchy=0"
Reboot.

Uninstall docker if you already did and install Docker CE.

@ThePlenkov
ThePlenkov / boot.sh
Last active May 7, 2024 16:39
Resolve WSL DNS automatically
#!/bin/bash
# Remove existing "nameserver" lines from /etc/resolv.conf
sed -i '/nameserver/d' /etc/resolv.conf
# Run the PowerShell command to generate "nameserver" lines and append to /etc/resolv.conf
# we use full path here to support boot command with root user
/mnt/c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe -Command '(Get-DnsClientServerAddress -AddressFamily IPv4).ServerAddresses | ForEach-Object { "nameserver $_" }' | tr -d '\r'| tee -a /etc/resolv.conf > /dev/null
@davidfowl
davidfowl / dotnetlayout.md
Last active May 7, 2024 16:39
.NET project structure
$/
  artifacts/
  build/
  docs/
  lib/
  packages/
  samples/
  src/
 tests/
" To get a list of Actions run `:actionlist `
" let mapleader = ','
" let mapleader = " "
let mapleader = "\<SPACE>"
set ignorecase smartcase
set NERDTree
set hlsearch
set showmode
set scrolloff=5
@don
don / hexStringToArrayBuffer.js
Created May 3, 2018 17:54
Convert hex string to ArrayBuffer
/**
* Convert a hex string to an ArrayBuffer.
*
* @param {string} hexString - hex representation of bytes
* @return {ArrayBuffer} - The bytes in an ArrayBuffer.
*/
function hexStringToArrayBuffer(hexString) {
// remove the leading 0x
hexString = hexString.replace(/^0x/, '');
@thomaslevesque
thomaslevesque / ThemeInfo.cs
Created September 6, 2012 08:33
Get information about current Windows theme in C#
public class ThemeInfo
{
private readonly string _themeName;
private readonly string _themeColor;
private readonly string _themeSize;
private readonly string _themeFileName;
public ThemeInfo(string name, string fileName, string color, string size)
{
_themeName = name;