Yvon Huynh

1

votes
2

answer
51

views

How to output first line of curl result in a file with bash script

I want to read a file of urls, curl each url and only get the first line which contains the HTTP code. I am running under Windows 10 inside Cmder. #!/bin/bash input='urls.csv' truncate -s 0 dest.csv while IFS= read -r var do result= `curl -I ${var%$'\r'} | grep HTTP $result` echo '$var $result' >> d...
Yvon Huynh
1

votes
1

answer
116

views

Windows Batch file enable quick edit for gitbash

I managed to launch gitbash from a bat file, I want also to enable quick edit mode how to do that ? thanks. cd 'C:\Program Files (x86)\Git\bin\' mode con: cols=160 lines=78 start sh.exe --login -i
Yvon Huynh
1

votes
1

answer
1.8k

views

How to access as root with WinSCP to Debian 8 server

Since direct login as root is not permitted in debian 8, how can I switch to root or log as root ?
Yvon Huynh
1

votes
2

answer
427

views

How to append to just the main body tag, in a page with iframes?

I am developing a Greasemonkey script to append a div right after the body tag, here is the jQuery: $('body:first').append ( 'SHOW my text here' ); It works fine as long as there is only one body tag on the page, but a problem arises when there are iframes on the webpage. It appends to all the body...
Yvon Huynh
1

votes
2

answer
251

views

PHP Developing a composer package under vendor of the main project

I have a main php project that needs a php component developed by me, that i intend to reuse in other projects, the component is in the main project vendor directory. However pushing to Github the component, go to the main project, running composer update is time consuming. In order to speed up the...
Yvon Huynh
1

votes
2

answer
157

views

Regex for coercing input for phone number in javascript

I have an input for a phone number in french format The input accepts two kinds of format, so i can input this: 0699999999 +33699999999 no check is done for the length of the number. The table in database, the field is of varchar 12, i can have shorter input though. The constraints: input contains...
Yvon Huynh
2

votes
0

answer
668

views

Gulp compiled css files are empty

I am new to Gulp, i use it in VS2015, with TaskRunnerExplorer. This is the config files with the paths: config = { base: '', webRoot: rootPath, paths: { source: { js: rootPath + 'Views/**/*.js', bundleJs: rootPath + 'wwwroot/scripts/app/**/*.js', minJs: rootPath + '**/*.min.js', testJs: rootPath + '...
Yvon Huynh
1

votes
1

answer
648

views

How to access vagrant guest servername?

I installed Vagrant,set up vagrant box as per the tutorial of the site Hashicorp, i have set up the port forwarding, the private network with a unique IP, and folder syncing. Here is what I have when I SSH in : login as: vagrant [email protected]'s password: Welcome to Ubuntu 14.04.5 LTS (GNU/Linux...
Yvon Huynh