Stack Overflow
   21 tags on

1 answer

Git: can't switch between branches

In a local folder with several files, I have a git repository for which branch x only includes a few of those files, and the master one includes them all. When I try to switch from x to master, I ...

1 answers | 55 secs ago by Ricky Robinson on Stack Overflow stackoverflow.com
1 answer

Meteor {{#markdown}}

I am making a forum with markdown support. I've been using meteor's markdown parser {{#markdown}} and have found something disturbing that I can't seem to figure out. I am using ...

0 answers

How to get environment variable PS1 by golang?

PS1 is an environment variable for bash prompt. I can get this by echo $PS1 I try to use os.Getenv to get PS1 but returns nothing: package main import ( "fmt" "os" ) func main() { ...

5 answers

How to override the path of PHP to use the MAMP path?

After screwing up entirely my PHP configuration on MAC trying to get the SOAP module working (-bash: /usr/bin/php: No such file or directory ....) I now have to use MAMP but each time I have to type ...

5 answers | 6 mins ago by sf_tristanb on Stack Overflow stackoverflow.com
0 answers

sed treating arguments as literals

I have a bash script: #!/bin/bash echo $1 > /proc/sys/kernel/hostname sed -i "s/HOSTNAME=.*/HOSTNAME=$1/" /etc/sysconfig/network When I run it, hostname file gets updated to whatever is passed ...

14 mins ago by Neil on Stack Overflow stackoverflow.com
2 answers

How to uninstall Bash-it?

I'm not quite ready for Bash-it and would like to go back to the original CLI. Any advice on how to remove Bash-it would be awesome. Thank you. Edit: Would love to know why I'm getting down voted so ...

2 answers | 15 mins ago by Waymond on Stack Overflow stackoverflow.com
0 answers

Cut a part of a video opencv c#

I begin with c# and i'm a bit stuck. I have to read a video in a imagebox (No problem), Then allow the user to draw a rectangle of selection (No problem), And finally cut the part inside the rectangle ...

0 answers

Homesick with bash-it as submodule

I'm using Homesick to maintain my dotfiles on Github. In addition to this, I'm also using the fabulous bash-it for general bash functionality and plugins. My dotfile configuration is kept in one ...

0 answers

Stdin to second command / password protected zip

I'm hoping to create a oneliner that converts the stdin stream to a (named) file in a password protected zip archive. So far I've got: mkfifo importlog.txt; cat - > importlog.txt & zip ...

0 answers

How to save pre-commit hooks on repository?

I have created a pre-commit hooks at .git/hooks/pre-commit. But I don't know how to push it to repository. Is there any solution for this?

5 answers

Bash: custom PS1 with nice working directory path

I am using Ubuntu and I am tired of this long prompts in bash when I am working with some deep directory hierarchy. So, I would like to tweak my PS1 to shorten the working directory part the following ...

5 answers | 22 mins ago by pajton on Stack Overflow stackoverflow.com
1 answer

How to pass a variable space character in tr command

In a shell script I would like to replace all underscore characters with a blank space in a function that use tr but a receive an error because I don't know of to pass a space in a variable to tr ...

1 answers | 27 mins ago by GabryRome on Stack Overflow stackoverflow.com
2 answers

Error using avisynth script as input to ffmpeg

I've searched the internet and haven't found a solution. I hope this question does not come off as a duplicate. I have the following files in the same folder: ffmpeg.exe (32-bit version) IN.mp4 ...

1 answer

Could not push my changes to my private Git-Hub. it says remote: Repository not found

I am trying to push my changes to existing Private GitHub. Commit was successful, push fails shows below error. it works for my other colleagues. Pull and commit works fine. only push fails. Git ...

1 answers | 36 mins ago by anand on Stack Overflow stackoverflow.com
5 answers

Is there any simple way to benchmark python script?

Usually I use shell command time. My purpose is to test if data is small, medium, large or very large set, how much time and memory usage will be. Any tools for linux or just python to do this?

5 answers | 36 mins ago by noomz on Stack Overflow stackoverflow.com
1 answer

How to play videos in one frame?

I want to add 4 videos to my web page, but I want A.mp4 video Play first until the end, and then video B.mp4 and then C.mp4 video, and D.mp4, and back to first video when all finished(looping). And I ...

0 answers

Using one or more repositories for one project?

I have a medium sized project in Javascript. Do I have to upload it all in one repository on github or in more than one? It looks fine when it's in one repository but than I have the problem that I ...

1 answer

Why is the index not updated after doing a git add in a pre-commit hook?

I have a pre-commit hook that: checks if my version file needs to be updated modifies said file performs a git add on this file This allows me to add the updated version file to the same commit. ...

1 answers | 46 mins ago by diesonne on Stack Overflow stackoverflow.com
4 answers

Check number in another file if in range using shell script

I have two files (fileA and fileB). FileA contains the list of numbers and fileB contains the number range. fileA 446646452 000000001 63495980020 fileB (range_from and range_to) ...

4 answers | 46 mins ago by newbie on Stack Overflow stackoverflow.com
0 answers

Get GitHub API to output specific Data and save as many requests as possible

For a private Project i am looking for a way to get as much Data from github as possible. What i want to achive is the following data structure: Programming Language / GH ProjectName / Project-ID / ...

3 answers

xargs: command substitution $(…) with pipe doesn't work

I'm trying to write short script, and the following command: echo "aaa111 bbb111" | xargs -I {} echo {} | sed 's/111/222/g' returns aaa222 bbb222, which is what I expect. I expected the next ...

9 answers

Bash script to get all IP addresses

I am trying to write a bash script to get all IP addresses on a server. The script should work on all major distros. Here is what I have: ifconfig | grep 'inet addr:' | awk {'print $2'} Resulting ...

9 answers | 54 mins ago by Justin on Stack Overflow stackoverflow.com
3 answers

Cannot remove file from working directory

I'm trying to checkout a branch, but keep getting this error: error: Your local changes to the following files would be overwritten by checkout: file.txt Please, commit your changes or stash ...

3 answers | 59 mins ago by Ilya Kogan on Stack Overflow stackoverflow.com
1 answer

how to add only volume controls on HTML5 video tag

I want to use HTML5 video tag, but in this case i want only volume controls... please help me <video controls id="myMovie" width="600" height="600" loop preload="auto" > <source src="any ...

1 answers | 1 hour ago by james joel on Stack Overflow stackoverflow.com
2 answers

Find missing files by their number?

I have a big list of ordered files with names like this file_1.txt file_2.txt file_3.txt file_6.txt file_7.txt file_8.txt file_10.txt In this case it is easy to see that files: ...

3 answers

how to measure the running time of a program in terminal

If I run a program ./a.out, and want to measure the time this program run. Is there such a command? >> ./a.out >> time xxxx Thanks!

3 answers | 1 hour ago by JASON on Stack Overflow stackoverflow.com
32 answers

How can I replace a newline (\n) using sed?

How can I replace a newline (\n) using sed? I unsuccesfully tried: sed 's#\n# #g' file sed 's#^$# #g' file How to fix it?

32 answers | 1 hour ago by hhh on Stack Overflow stackoverflow.com
0 answers

How can I use video file or stream like storage for any king of data

I wonder if there known ways to use video files to store any random data, not only what human eye can see. Like we will take source data, text file for example, then need to prepare it as video ...

4 answers

How do you push code with gitg?

I can do everything else I need but with the GUI I cannot seem to figure out how to pull or push code. Pushing is more important in this case, anyone know how?

4 answers | 1 hour ago by jlane09 on Stack Overflow stackoverflow.com
7 answers

Git: Commit to multiple branches at the same time

I want to make a single commit on different branches at the same time, since, in my project, I have different branches for different clients. Say, I have made a new feature commit on Branch A. Can I ...

7 answers | 1 hour ago by Kit Ho on Stack Overflow stackoverflow.com
15 30 50 per page
1 2 3