Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| # built application files | |
| *.apk | |
| *.ap_ | |
| # files for the dex VM | |
| *.dex | |
| # Java class files | |
| *.class |
| # alias to edit commit messages without using rebase interactive | |
| # example: git reword commithash message | |
| reword = "!f() {\n GIT_SEQUENCE_EDITOR=\"sed -i 1s/^pick/reword/\" GIT_EDITOR=\"printf \\\"%s\\n\\\" \\\"$2\\\" >\" git rebase -i \"$1^\";\n git push -f;\n}; f" | |
| # git alias to download single file from a repo in format of user/repo file | |
| fetch-file = "!f() { out=\"${4:-$(basename \"$2\")}\"; if gh api \"repos/$1/contents/$2\" ${3:+-f ref=$3} --jq '.content' 2>/dev/null | base64 --decode > \"$out\" 2>/dev/null; then echo \"Downloaded $2 → $out\"; else echo \"Failed\"; rm -f \"$out\"; fi; }; f" | |
| # git alias to download single file from a repo in the format of user/repo/file | |
| fetch-file = "!f() { repo=\"$(echo $1 | cut -d/ -f1-2)\"; file=\"$(echo $1 | cut -d/ -f3-)\"; out=\"${3:-$(basename \"$file\")}\"; if gh api \"repos/$repo/contents/$file\" ${2:+-f ref=$2} --jq '.content' 2>/dev/null | base64 --decode > \"$out\" 2>/dev/null; then echo \"Downloaded $file → $out\"; else echo \"Failed\"; rm -f \"$out\"; fi; |
| # This is how you add a Jenkins slave | |
| # On master: | |
| sudo -u jenkins -H ssh-keygen | |
| # On slave | |
| adduser --system --group --home=/var/lib/jenkins-slave --no-create-home --disabled-password --quiet --shell /bin/bash jenkins-slave | |
| install -d -o jenkins-slave -g jenkins-slave /var/lib/jenkins-slave |
| import java.util.ArrayList; | |
| import java.util.HashMap; | |
| import java.util.Iterator; | |
| import java.util.List; | |
| import java.util.Map; | |
| import java.util.Scanner; | |
| import java.util.regex.Matcher; | |
| import java.util.regex.Pattern; | |
| import org.apache.log4j.Logger; |
| # Hello, and welcome to makefile basics. | |
| # | |
| # You will learn why `make` is so great, and why, despite its "weird" syntax, | |
| # it is actually a highly expressive, efficient, and powerful way to build | |
| # programs. | |
| # | |
| # Once you're done here, go to | |
| # http://www.gnu.org/software/make/manual/make.html | |
| # to learn SOOOO much more. |
Here are my attempts to script an IntelliJ-based IDE using javax.script.* API (ex-JSR-223).
The list of available scripting languages and engines:
<app>/lib/groovy-jsr223-xxx.jar<app>/jbr/... (deprecated and will be removed soon)| From this [issue](https://github.com/puphpet/puphpet/issues/1025#issuecomment-157059174): | |
| I know that this issue is closed, but as I spent a lot of time to understand what was going on, I made some researches and I can explain why this happen, and you can fix it. | |
| Using git config core.autocrlf true can help, but not on a multi-developpers project. | |
| This command has to be the same on each developper machine, and that's not always the case. | |
| You have to use the .gitattributes provided in the puphpet archive and edit it as follow (carefull, this file need to be in your project root) | |
| You also need to use an IDE that allow you to save/edit files as LF (like phpstorm). You can check the type of the file in the bottom right corner, in the status bar (you'll see LF or CRLF while a file is opened) |
| $socket = new-object System.Net.Sockets.TcpListener('0.0.0.0', 1080); | |
| if($socket -eq $null){ | |
| exit 1; | |
| } | |
| $socket.start(); | |
| $client = $socket.AcceptTcpClient(); | |
| $stream = $client.GetStream(); | |
| $buffer = new-object System.Byte[] 2048; | |
| $file = 'c:/afile.exe'; | |
| $fileStream = New-Object System.IO.FileStream($file, [System.IO.FileMode]'Create', [System.IO.FileAccess]'Write'); |
| #!/bin/bash | |
| # Argument = -h -v -i groupId:artifactId:version -c classifier -p packaging -r repository | |
| #shopt -o -s xtrace | |
| # Define Nexus Configuration | |
| NEXUS_BASE=${NEXUS_BASE-:http://repository.example.com:8081/nexus} | |
| REST_PATH=/service/local | |
| ART_REDIR=/artifact/maven/redirect |