This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#-*- coding: utf-8 -*- | |
from selenium import webdriver | |
from selenium.webdriver.common.action_chains import ActionChains | |
from selenium.webdriver.common.keys import Keys | |
import re | |
import time | |
import os, sys | |
from urllib import parse |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> | |
<title>Media</title> | |
<link rel="dns-prefetch" href="https://unpkg.com"> | |
<link rel="preconnect" href="https://unpkg.com"> | |
<link href="https://unpkg.com/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"> | |
</head> | |
<body> | |
<div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function GET($url, $user_agent = 'CURL', $proxy_type = CURLPROXY_SOCKS5_HOSTNAME, $proxy = null, $header = null, $timeout = 10) | |
{ | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_URL, $url); | |
curl_setopt($ch, CURLOPT_USERAGENT, $user_agent); | |
$header != null && curl_setopt($ch, CURLOPT_HTTPHEADER, $header); | |
$proxy != null && curl_setopt($ch, CURLOPT_PROXYTYPE, $proxy_type); | |
$proxy != null && curl_setopt($ch, CURLOPT_PROXY, $proxy); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for i in {0..7}; do | |
# min cpu freq to 3.4GHz | |
echo 3400000 > "/sys/devices/system/cpu/cpu$i/cpufreq/scaling_min_freq" | |
# set max cpu freq to 4.5GHz | |
echo 4500000 > "/sys/devices/system/cpu/cpu$i/cpufreq/scaling_max_freq" | |
# set cpu preference to performance | |
echo performance > "/sys/devices/system/cpu/cpu$i/cpufreq/energy_performance_preference" | |
# set cpu governor to performance | |
echo performance > "/sys/devices/system/cpu/cpu$i/cpufreq/scaling_governor" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace DESMG\MariaDB\V11_0_2; | |
enum MariaDBError: int | |
{ | |
/** hashchk */ | |
case ER_HASHCHK = 1000; | |
/** isamchk */ | |
case ER_NISAMCHK = 1001; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function countryCodeGetEmoji($countryCode = 'XX', $continent = 'XX'): string | |
{ | |
try { | |
if (strlen($countryCode) !== 2) { | |
throw new InvalidArgumentException('Invalid country code'); | |
} | |
if ($countryCode === 'XX') { | |
return mb_convert_encoding("🌐", 'UTF-8', 'HTML-ENTITIES'); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
brew update && brew upgrade imagemagick | |
iconutil -c iconset --output ~/Downloads/icon.iconset /Applications/lghub.app/Contents/Resources/icon.icns | |
magick ~/Downloads/icon.iconset/[email protected] -resize 512x512 ~/Downloads/icon.iconset/icon_512x512.png | |
magick ~/Downloads/icon.iconset/[email protected] -resize 512x512 ~/Downloads/icon.iconset/[email protected] | |
magick ~/Downloads/icon.iconset/[email protected] -resize 256x256 ~/Downloads/icon.iconset/icon_256x256.png |