- Chroot into your linux instalation
- The easiest way is with
mhwd-chroot- Install it
yaourt -S mhwd-chroot - Run it
sudo mhwd-chroot - DONE, you have chrooted into your linux installation (open a root console of your installed linux OS, is like just open a console with root access)
- Install it
- The easiest way is with
- Restore your GRUB
- Install a new GRUB bootloader with
grub-install /dev/sda
- Install a new GRUB bootloader with
- Recheck to ensure the that installation has completed without any errors
grub-install --recheck /dev/sda
| "use client"; | |
| import { useState, useEffect, useRef } from "react"; | |
| function SimpleRecordButton() { | |
| const [isRecording, setIsRecording] = useState(false); | |
| const [audioStream, setAudioStream] = useState(null); | |
| const [mediaRecorder, setMediaRecorder] = useState(null); | |
| const [audioBlob, setAudioBlob] = useState(null); | |
| const [recordingTime, setRecordingTime] = useState(0); | |
| const timerRef = useRef(null); |
| ffmpeg -i input.mp4 -s hd480 -c:v libx264 -crf 23 -c:a aac -strict -2 output.mp4 |
| import { v4 as uuid } from 'uuid'; | |
| export function generateId() { | |
| return uuid(); | |
| } | |
| const v4 = new RegExp(/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i); | |
| console.log(generateId().match(v4)); | |
| //console.log(generateId().length) |
| [ | |
| { | |
| "paletteName": "gray", | |
| "swatches": [ | |
| { | |
| "name": "100", | |
| "color": "#f7fafc" | |
| }, | |
| { | |
| "name": "200", |
Hacking CORS restriction to enable in-browser XHR to any server.
Say you are running an web app at localhost, and you want to send XHR to http://remote-server:80, but the CORS restriction forbids access because you are sending requests from an origin that remote-server:80 does not allow.
Run:
log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
To configure as an alias git lol:
git config --global alias.lol "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
| #!/bin/bash | |
| # Colors definitions | |
| RED='\033[0;31m' | |
| GREEN='\033[0;32m' | |
| NC='\033[0m' # No Color | |
| BOLD=$(tput bold) | |
| NORMAL=$(tput sgr0) | |
| # Check if necessary applications are installed |
https://stackoverflow.com/a/18003462/348146
None of these suggestions worked for me, because Android was appending a sequence number to the package name to produce the final APK file name (this may vary with the version of Android OS). The following sequence of commands is what worked for me on a non-rooted device:
Determine the package name of the app, e.g.
com.example.someapp. Skip this step if you already know the package name.
adb shell pm list packagesLook through the list of package names and try to find a match between the app in question and the package name. This is usually easy, but note that the package name can be completely unrelated to the app name. If you can't recognize the app from the list of package names, try finding the app in Google Play using a browser. The URL for an app in Google Play contains the package name.