ALTER SEQUENCE project_detail_question_category_id_seq RESTART WITH 1
dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.{{Command}}
dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Play
<?php | |
function readable_number($number, $discharge = 0, $fractional = null, $fractional_count = 1) | |
{ | |
$int_number = intval($number); | |
if($int_number > 999) | |
{ | |
$num = substr($int_number, 0, strlen($int_number) - 3); | |
$discharge++; |
error: key "CEB167EFB5722BD6" could not be looked up remotely error: required key missing from keyring error: failed to commit transaction (unexpected error)
$ sudo pacman-key --lsign-key CEB167EFB5722BD6
if this gives error ERROR: CEB167EFB5722BD6 could not be locally signed.
$ sudo pacman-key --refresh-keys
Refer official docs [https://conda.io/docs/user-guide/tasks/manage-environments.html]
Simplified: https://medium.freecodecamp.org/why-you-need-python-environments-and-how-to-manage-them-with-conda-85f155f4353c
conda create --help
- To prints detailed information about all PCI buses and devices in the system
$ lspci
to get specific pci buses info
$ lspci | grep -i nvidia
There are some small changes you can make to make your website faster, and a little more secure.
The original configuration will keep you safe, but it is always good to see what else can be done.
By default, the nginx.conf will return "403 Forbidden" errors for system files that are not supposed to be accessed directly. However, there's a good alternative, like so:
function cryptoUniqid(string $prefix = '', bool $prng = false): string | |
{ | |
static $nonce = null; | |
if($prng || is_null($nonce)) { | |
$nonce = random_bytes(16); | |
} else { | |
sodium_increment($nonce); | |
} | |
$m = microtime(true); | |
$return = sprintf("%8x%05x", floor($m), ($m-floor($m))*1000000); |
<?php | |
//simple class to convert number to words in php based on http://www.karlrixon.co.uk/writing/convert-numbers-to-words-with-php/ | |
if ( !class_exists('NumbersToWords') ){ | |
/** | |
* NumbersToWords | |
*/ | |
class NumbersToWords{ | |
public static $hyphen = '-'; | |
public static $conjunction = ' and '; |
export const kebabToPascalCase = str.replace(/(?:^\w|[A-Z]|\b\w)/g, (letter, index) => letter.toUpperCase()).replace(/[^\w]+/g, ""); | |
// eg: some-string => SomeString | |
export const toNepaliNumber = n => (n + '').replace(/\d/g, i => '०१२३४५६७८९'[i]) | |
export const numberToWord = amount => { | |
const a = ["", "One ", "Two ", "Three ", "Four ", "Five ", "Six ", "Seven ", "Eight ", "Nine ", "Ten ", "Eleven ", "Twelve ", "Thirteen ", "Fourteen ", "Fifteen ", "Sixteen ", "Seventeen ", "Eighteen ", "Nineteen"]; | |
const b = ["", "Ten", "Twenty", "Thirty", "Forty", "Fifty", "Sixty", "Seventy", "Eighty", "Ninety"]; | |
amount = (amount.toFixed(2)).toString().split("."); |