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 bcrypt($password) | |
{ | |
$hash = password_hash($password, PASSWORD_BCRYPT, ['cost' => 10]); | |
if ($hash === false) | |
{ | |
throw new RuntimeException('Bcrypt hashing not supported.'); | |
} |
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
#[derive(Debug)] | |
enum Lx { | |
Str(String), | |
Int(String), | |
Keyword(String), | |
LxUnk(char), | |
} | |
fn main() { |
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
.form-group-vertical .form-control:focus { | |
border-color: #cccccc; | |
outline: 0; | |
-webkit-box-shadow: none; | |
box-shadow: none; | |
} | |
.form-group-vertical .form-group { | |
margin-bottom: 0px; | |
} | |
.form-group-vertical .form-group input { |
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
# first we need the SSID | |
iwconfig | grep "ESSID\|SSID" | |
# now run this | |
sudo cat /etc/NetworkManager/system-connections/YOUR_SSID | grep "psk=" | |
Example | |
------------------ | |
> iwconfig | grep "ESSID\|SSID" |
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
//Add cron | |
function ffs(){ | |
echo "string"; | |
} | |
add_action('init', function(){ | |
error_reporting(-1); | |
$events = array( | |
'admin_theme_wysija_hourly', | |
); |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Test</title> | |
</head> | |
<style type="text/css"> | |
.close{ | |
color: #000; | |
float: right; | |
font-size: 21px; |
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
foreach (_get_cron_array() as $timestamp => $_crons){ | |
foreach ($_crons as $cron_name => $cron_args){ | |
foreach ($cron_args as $cron) { | |
$crons[$cron['schedule']][] = $cron_name; | |
} | |
} | |
} | |
// 'wysija_hourlys' | |
// wp_clear_scheduled_hook('admin_theme_wysija_hourly'); |
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
// get current page | |
global $pagenow; |
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
$user = array( | |
'user_login' => admin_theme_user_manager::generate_username($username), | |
'user_pass' => wp_generate_password(5, false), | |
'user_email' => $subscriber['user_email'], | |
'first_name' => $subscriber['first_name'], | |
'last_name' => $subscriber['last_name'], | |
); | |
$user_id = wp_insert_user($user); |
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
add_action( 'admin_bar_menu', function($wp_admin_bar){ | |
$wp_admin_bar->remove_menu('search'); | |
}, 10 ); |