Skip to content

Instantly share code, notes, and snippets.

View Lampe2020's full-sized avatar
💻

Christian Lampe Lampe2020

💻
View GitHub Profile
@pvm-77
pvm-77 / findphpini.md
Created April 11, 2023 10:38
how to find php.ini file in ubuntu

In Ubuntu, the location of the php.ini file can vary depending on the installation and version of PHP you are using, as well as the web server you are using. Here are a few common locations where you can find the php.ini file:

  1. /etc/php/7.4/apache2/php.ini This is the default location for the php.ini file for PHP version 7.4 on Apache web server.

  2. /etc/php/7.4/cli/php.ini This is the php.ini file used by the PHP command-line interface (CLI).

  3. /usr/local/etc/php/php.ini This is the location for the php.ini file on some installations of PHP.

#!/bin/bash
MYSELF=`realpath $0`
DEBUG=/dev/null
echo $MYSELF >> $DEBUG
if [ "$EUID" -ne 0 ]
then
NEWMYSELF=`mktemp -u 'XXXXXXXX'`
sudo cp $MYSELF /opt/$NEWMYSELF
@MPThLee
MPThLee / enableDiscordExperiments.js
Last active April 29, 2025 04:25
This code doesn't work anymore. I just decided to remove this code. You can check working code on comments.
/**
* !!!! This code doesn't work anymore !!!!
*
* - You can check working code on comments. I won't update this code anymore.
*
* Also, I just decided to remove this code. You can check revisions for old code.
* Since this code was made for discord client that almost 5 years ago, It seems like doesn't work anymore.
* I don't want people keep arguing in the comments, i decided to remove this code.
*
* Note: This code is now fulfilled with Javascript comments. This code won't work even if you pasted to console. doesn't do anything.
@djego
djego / rsa.py
Created September 30, 2017 23:20
A simple RSA implementation in Python
'''
620031587
Net-Centric Computing Assignment
Part A - RSA Encryption
'''
import random
'''
@drewchapin
drewchapin / HTML Application.hta
Last active August 29, 2024 12:54
Template for an HTML Application file (.hta), add to C:\Windows\ShellNew, and add ShellNew\Filename="HTML Application.hta" to .hta HKCR key.
<html>
<head>
<!--
@tag hta:application
@attribute ApplicationName Sets the name of the HTA.
@attribute Border [Thick]|Thin|None
@attribute BorderStyle [Normal]|Raised|Sunken|Complex|Static
@attribute Caption [Yes]|No
@idelsink
idelsink / .clang-format
Last active April 4, 2025 10:08
Clang format file.
# clang-format
# Made by: Ingmar Delsink
# https://ingmar.dels.ink
# See http://clang.llvm.org/docs/ClangFormatStyleOptions.html
# Tested with: clang-format version 3.7.1
# General
#########
# The style used for all options not specifically set in the configuration.
@jasonrdsouza
jasonrdsouza / key_detect.py
Created February 24, 2012 15:54
Python function to get keypresses from the terminal
def getchar():
#Returns a single character from standard input
import tty, termios, sys
fd = sys.stdin.fileno()
old_settings = termios.tcgetattr(fd)
try:
tty.setraw(sys.stdin.fileno())
ch = sys.stdin.read(1)
finally:
termios.tcsetattr(fd, termios.TCSADRAIN, old_settings)