Skip to content

Instantly share code, notes, and snippets.

@JBlond
JBlond / smc_read smc_read.c
Created May 17, 2022
Mac OS X 10.5 smc_read smc_read
View smc_read smc_read.c
/*
* smc_read.c: Written for Mac OS X 10.5. Compile as follows:
*
* gcc -Wall -o smc_read smc_read.c -framework IOKit
*/
#include <stdio.h>
#include <IOKit/IOKitLib.h>
@JBlond
JBlond / LdapAuth.php
Last active Nov 2, 2021
LdapAuth php
View LdapAuth.php
<?php
/**
* LDAP Auth Handler
*/
class LdapAuth
{
/**
* @var false|resource
*/
private $handle;
@JBlond
JBlond / 99fixbadproxy
Created Oct 11, 2021 — forked from trastle/99fixbadproxy
Fixing the issue with apt caused by a bad local proxy: -1- Create 99fixbadproxy at: /etc/apt/apt.conf.d/99fixbadproxy -2- Run clear.sh
View 99fixbadproxy
Acquire::http::Pipeline-Depth "0";
Acquire::http::No-Cache=True;
Acquire::BrokenProxy=true;
@JBlond
JBlond / change-wallpaper.bat
Created Sep 1, 2021 — forked from eliashussary/change-wallpaper.bat
A simple batch script to change your windows wallpaper. It takes a single argument, the path of your desired wallpaper.
View change-wallpaper.bat
echo off
:: Handle CLI Args
IF [%1]==[] (
echo No wallpaper path provided, please provide a full qualified path. Ex: C:\dir1\dir2\wallpaper.jpg
exit /b 1
)
:: Commands
echo Changing wallpaper to: %1
View generateChangelog.php
<?php
$output = "# changelog\n\n";
$previousTag = 0;
$gitTags = shell_exec("git tag --sort=-creatordate");
$gitTagsArray = explode("\n", $gitTags);
foreach ($gitTagsArray as $gitTag) {
@JBlond
JBlond / smb.conf
Created Dec 27, 2020
smb tuning Windows 10
View smb.conf
[global]
read raw = Yes
write raw = Yes
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=131072 SO_SNDBUF=131072
min receivefile size = 16384
use sendfile = true
aio read size = 16384
aio write size = 16384
protocol = SMB3
@JBlond
JBlond / install.bash
Created Aug 19, 2020
wordpress fast installation WP CLI
View install.bash
#!/bin/bash
wp core download
wp core config --dbhost=localhost --dbname=press --dbuser=press --dbpass=asasaasasasa --dbprefix=wp_
wp core install --url=example.com --title="Test Site" --admin_user=admin --admin_password=admin --admin_email=admin@example.com
wp core update
wp core update -db
wp plugin uninstall hello
wp theme install micro
wp theme activate micro
wp theme uninstall twentynineteen twentyseventeen twentytwenty
View uncide.php
<?php
class 🤘 {
const 😁 = '👽';
public function 🤡()
{
return self::😁;
}
}
View leapyear.php
<?php
function isLeapYear(int $year): bool
{
return $year % 4 == 0 && $year % 100 != 0 || $year % 400 == 0;
}
@JBlond
JBlond / openssl_configure.md
Last active Jun 26, 2020 — forked from steakknife/openssl_configure.md
OpenSSL configure options
View openssl_configure.md

OpenSSL Configure Options (1.1.1g)

Standard party line

Usage: Configure [no-<cipher> ...] [enable-<cipher> ...] [experimental-<cipher> ...]
                 [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [no-hw-xxx|no-hw]
                 [[no-]threads] [[no-]shared] [[no-]zlib|zlib-dynamic] [no-asm]
                 [no-dso] [no-krb5] [sctp] [386] [--prefix=DIR]

[--openssldir=OPENSSLDIR] [--with-xxx[=vvv]] [--test-sanity]