Skip to content

Instantly share code, notes, and snippets.

@Hardikanand1st
Hardikanand1st / Power iso Serial keys.txt
Last active June 29, 2024 15:45
power iso Serial Keys
===============================================================================
User Name-: Hardik
Registration code :- TZXZT-USMCB-ZRKYP-MTVG3-JM8UL
===============================================================================
@NabiKAZ
NabiKAZ / route.php
Last active September 19, 2023 16:09
For show advanced list of files and directories with sort, date, size, icon type,..., Save bellow content code as `route.php` file, and then run this command: `php -S 0.0.0.0:8080 -t . route.php` And then open `http://localhost:8080/` in the browser.
<?php
//@NabiKAZ
//https://gist.github.com/NabiKAZ/91f716faa89aab747317fe09db694be8
//For show advanced list of files and directories with sort, date, size, icon type,...,
//Save bellow content code as route.php file, and then run this command:
// php -S 0.0.0.0:8080 -t . route.php
//And then open http://localhost:8080/ in the browser.
//////////////////////////////////////////////////////////////////
// This block MUST be at the very top of the page!
@ob_start('ob_gzhandler');
@berkorbay
berkorbay / github_desktop_ubuntu.md
Last active July 4, 2024 19:23
To install Github Desktop for Ubuntu

IMPORTANT

See the following links for further updates to Github Desktop for Ubuntu. These are official instructions. (also mentioned by fetwar on Nov 3, 2023)

For the sake of "maintaining the tradition" here is the updated version.

@lucabelluccini
lucabelluccini / rpi4.boot-from-sd-rootfs-on-usb.md
Last active October 13, 2023 12:38
Raspberry Pi 4 - Boot from SD, Rootfs on USB

Raspberry 4B - Boot from SD and rootfs on USB

Update

RPi4 now supports booting directly from USB. First update to get an eeprom which supports USB Boot, then configure the bootloader to boot from USB.

Original guide

  1. Download Raspbian from the official site
@ChaoLiangSuper
ChaoLiangSuper / encryption.ts
Last active March 24, 2024 14:30 — forked from vlucas/encryption.js
Stronger Encryption and Decryption in typescript
import crypto from 'crypto';
const ALGORITHM = 'aes-256-cbc';
const ENCODING = 'hex';
const IV_LENGTH = 16;
const KEY = process.env.ENCRYPTION_KEY!;
export const encrypt = (data: string) => {
const iv = crypto.randomBytes(IV_LENGTH);
const cipher = crypto.createCipheriv(ALGORITHM, new Buffer(KEY), iv);
@tluyben
tluyben / Forth1.cs
Last active April 7, 2024 22:00
A minimal Forth implementation in C#
/*
* Minimal .NET Forth implementation. Just an experiment. Do not use for anything serious.
* by Tycho Luyben (https://github.com/tluyben)
*
* The only 'primitive' (built-in) is an foreign function interface word which allows you to define
* whatever is needed, for example:
*
* hello System.String System.Console.WriteLine ffi
*
* will print hello.
@sparksbat
sparksbat / ProcessUtils.cs
Created October 24, 2017 21:23
C# Get Foreground Process
using System;
using System.Runtime.InteropServices;
using System.Diagnostics;
namespace FGWindow
{
class ProcessUtils
{
[DllImport("user32.dll")]
private static extern IntPtr GetForegroundWindow();
@hotohoto
hotohoto / nodejs_systemctl.md
Created August 23, 2017 05:27
Run Node.js web server via systemctl

Make a configuration file like below at /etc/systemd/system/nodejs_www.service.

[Unit]
Description=My Node.js Web Server

[Service]
ExecStart=/usr/bin/yarn start

WorkingDirectory=/home/hotohoto/app
@lgaff
lgaff / boot.asm
Created November 30, 2012 03:02
FAT12 stage 1 boot loader
; incboot.s
; Incrementally build a boot block for x86
; I'm going to keep adding bits to this one step at a time from
; boot-and hang to hopefully loading a kernel
; Here we go.
; We're implementing a FAT12 file system for the boot disk. This file system is well
; documented so it shouldn't be a hard ask for a first-timer like me.
; There is a certain order required for the metadata appearing at the top of the
; boot block below the jump to start, we'll introduce each as we go.
@billymoon
billymoon / php-auth-linux-account.php
Created October 30, 2011 10:34
function to authenticate users from within php against linux user accounts on the server
/* Need to add www-data to group shadow (and restart apache)
$ sudo adduser www-data shadow
$ sudo /etc/init.d/apache2 restart
Needs whois to be installed to run mkpasswd
$ sudo apt-get install whois
Assumes that sha-512 is used in shadow file
*/
function authenticate($user, $pass){
// run shell command to output shadow file, and extract line for $user