Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Jwan Khalaf JwanKhalaf

🎯
Focusing
  • United Kingdom
View GitHub Profile
View migrations
CREATE TABLE IF NOT EXISTS "__EFMigrationsHistory" (
migration_id character varying(150) NOT NULL,
product_version character varying(32) NOT NULL,
CONSTRAINT pk___ef_migrations_history PRIMARY KEY (migration_id)
);
CREATE TABLE asp_net_roles (
id text NOT NULL,
name character varying(127) NULL,
normalized_name character varying(127) NULL,
View keybase.md

Keybase proof

I hereby claim:

  • I am jwankhalaf on github.
  • I am jwan (https://keybase.io/jwan) on keybase.
  • I have a public key ASB9jyWtkn7Ks4fr7IyuB7FoLKWck7PH9-32DA6ABtyzrgo

To claim this, I am signing this object:

View files
let formData = new FormData(document.querySelector('#request-for-change-form'));
console.log(selectedFiles);
for (var i = 0; i < selectedFiles.length; i++) {
formData.append("files[]", selectedFiles[0]);
}
console.log(formData.getAll('files[]'));
$("#request-for-change-form").submit();
View command
sqlcmd -S localhost -U SA -Q "RESTORE FileListOnly (RESTORE FILELISTONLY FROM DISK = N'/opt/mssql/BejebejeDb2018-04-13.bak'), MOVE '2J8fz00d6chl' TO '/opt/mssql/2J8fz00d6chl.mdf', MOVE '2J8fz00d6chl_Log' TO '/opt/mssql/2J8fz00d6chl_log.ldf', NOUNLOAD, REPLACE, NORECOVERY, STATS =5"
View command and error
➜ ~ sqlcmd -S localhost -U SA -Q "RESTORE DATABASE [bejebeje] FROM DISK = N'/opt/mssql/BejebejeDb2018-04-13.bak' WITH FILE = 1, MOVE '2J8fz00d6chl' TO '/opt/mssql/2J8fz00d6chl.mdf', MOVE '2J8fz00d6chl_Log' TO '/opt/mssql/2J8fz00d6chl_log.ldf', NOUNLOAD, REPLACE, NORECOVERY, STATS =5"
Password:
Msg 3634, Level 16, State 1, Server jwan-pc, Line 1
The operating system returned the error '2(The system cannot find the file specified.)' while attempting 'RestoreContainer::ValidateTargetForCreation' on '/opt/mssql/2J8fz00d6chl.mdf'.
Msg 3156, Level 16, State 5, Server jwan-pc, Line 1
File '2J8fz00d6chl' cannot be restored to '/opt/mssql/2J8fz00d6chl.mdf'. Use WITH MOVE to identify a valid location for the file.
Msg 3634, Level 16, State 1, Server jwan-pc, Line 1
The operating system returned the error '2(The system cannot find the file specified.)' while attempting 'RestoreContainer::ValidateTargetForCreation' on '/opt/mssql/2J8fz00d6chl_log.ldf'.
Msg 3156, Level 16, State 5, Server jwan-pc, Line 1
File '2J8fz00d6
View db restore error
➜ ~ sqlcmd -S localhost -U SA -Q "RESTORE DATABASE [bejebeje] FROM DISK = N'/opt/mssql/BejebejeDb2018-04-13.bak' WITH FILE = 1, NOUNLOAD, REPLACE, NORECOVERY, STATS =5"
Password:
Msg 5133, Level 16, State 1, Server jwan-pc, Line 1
Directory lookup for the file "C:\Program Files\Microsoft SQL Server\MSSQL12.SQLEXPRESS\MSSQL\DATA\2J8fz00d6chl.mdf" failed with the operating system error 2(The system cannot find the file specified.).
Msg 3156, Level 16, State 3, Server jwan-pc, Line 1
File '2J8fz00d6chl' cannot be restored to 'C:\Program Files\Microsoft SQL Server\MSSQL12.SQLEXPRESS\MSSQL\DATA\2J8fz00d6chl.mdf'. Use WITH MOVE to identify a valid location for the file.
Msg 5133, Level 16, State 1, Server jwan-pc, Line 1
Directory lookup for the file "C:\Program Files\Microsoft SQL Server\MSSQL12.SQLEXPRESS\MSSQL\DATA\2J8fz00d6chl_log.ldf" failed with the operating system error 2(The system cannot find the file specified.).
Msg 3156, Level 16, State 3, Server jwan-pc, Line 1
File '2J8fz00d6chl_log' cannot be rest
View files and directories
➜ ~ ls -l
total 48
drwxr-xr-x 8 jwan jwan 4096 Dec 27 17:55 code
drwxr-xr-x 2 jwan jwan 4096 Dec 19 12:45 Desktop
drwxr-xr-x 2 jwan jwan 4096 Jan 16 19:48 Documents
drwxr-xr-x 4 jwan jwan 4096 Jan 16 19:54 Downloads
drwx------ 17 jwan jwan 4096 Jan 16 22:55 Dropbox
drwxr-xr-x 2 jwan jwan 4096 Jan 15 18:37 Music
-rw-r--r-- 1 jwan jwan 40 Jan 1 14:59 nuora-ilr-password
drwxr-xr-x 2 jwan jwan 4096 Jan 3 15:27 Pictures
View docker build
Sending build context to Docker daemon 562.2kB
Step 1/13 : FROM alpine:3.11.2 AS builder
---> cc0abc535e36
Step 2/13 : MAINTAINER Jwan Khalaf <jwan.khalaf@outlook.com>
---> Running in 646b5845dd79
Removing intermediate container 646b5845dd79
---> 3be3c15f08a3
Step 3/13 : RUN wget -O - 'https://github.com/elm/compiler/releases/download/0.19.1/binary-for-linux-64-bit.gz' | gunzip -c >/usr/local/bin/elm
---> Running in 1ce505d3b7b0
View gist:510dc9f2c7f194b18369be10e89d070b
[jwan@jwan-pc ~]$ cat /run/systemd/resolve/stub-resolv.conf
cat: /run/systemd/resolve/stub-resolv.conf: No such file or directory
[jwan@jwan-pc ~]$ cat /etc/resolv.conf
# Generated by NetworkManager
nameserver 192.168.1.1
[jwan@jwan-pc ~]$
View gist:632ad59835f2ef4971b9e9fedba28d64
[jwan@jwan-pc ~]$ file /usr/lib/systemd/systemd-resolved
/usr/lib/systemd/systemd-resolved: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=0ac8d0b28cf931fe7b60441f911777e49f4bf1d0, for GNU/Linux 3.2.0, stripped
[jwan@jwan-pc ~]$