This file contains 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 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/bootstrap@3.4.1/dist/css/bootstrap.min.css" rel="stylesheet"> | |
</head> | |
<body> | |
<div> |
This file contains 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 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 | |
# min cpu freq to 2.0GHz | |
echo 2000000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq | |
echo 2000000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq | |
echo 2000000 > /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq | |
echo 2000000 > /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq | |
echo 2000000 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq | |
echo 2000000 > /sys/devices/system/cpu/cpu5/cpufreq/scaling_min_freq | |
echo 2000000 > /sys/devices/system/cpu/cpu6/cpufreq/scaling_min_freq | |
echo 2000000 > /sys/devices/system/cpu/cpu7/cpufreq/scaling_min_freq |
This file contains 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
const http = require('node:http'); | |
const fs = require('node:fs'); | |
const cp = require('node:child_process'); | |
const url = require('node:url'); | |
const allowedDevices = /(sd[a-z]|nvme\d|nvme\dn1|disk\d)/; | |
const server = http.createServer(); | |
server.on('request', getSmart); | |
server.listen(7627, '127.0.0.1'); |
This file contains 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 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
# frozen_string_literal: true | |
require 'prawn' | |
families = { | |
'JetBrains Mono NL' => { | |
bold: { file: "{{ $fontPath }}JetBrainsMonoNL-Bold.ttf" }, | |
bold_italic: { file: "{{ $fontPath }}JetBrainsMonoNL-BoldItalic.ttf" }, | |
extra_bold: { file: "{{ $fontPath }}JetBrainsMonoNL-ExtraBold.ttf" }, | |
extra_bold_italic: { file: "{{ $fontPath }}JetBrainsMonoNL-ExtraBoldItalic.ttf" }, |
This file contains 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 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/icon_512x512@2x.png -resize 512x512 ~/Downloads/icon.iconset/icon_512x512.png | |
magick ~/Downloads/icon.iconset/icon_512x512@2x.png -resize 512x512 ~/Downloads/icon.iconset/icon_256x256@2x.png | |
magick ~/Downloads/icon.iconset/icon_512x512@2x.png -resize 256x256 ~/Downloads/icon.iconset/icon_256x256.png |
OlderNewer