sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl sudo chmod a+rx /usr/local/bin/youtube-dl
# show weather | |
alias weather='curl wttr.in/Waregem' | |
alias weer='function _weer(){ echo "Getting weather for $1"; curl wttr.in/$1; };_weer' | |
# Which commands do I use the most? | |
alias histstats="history | awk '{CMD[\$2]++;count++;}END { for (a in CMD)print CMD[a] \" \" CMD[a]/count*100 \"% \" a;}' | grep -v './' | column -c3 -s ' ' -t | sort -nr | nl | head -n10" | |
# like `history` but with dates | |
alias h="fc -li 1" |
import sublime, sublime_plugin, time | |
class InsertDatetimeCommand(sublime_plugin.TextCommand): | |
def run(self, edit): | |
sel = self.view.sel(); | |
for s in sel: | |
self.view.replace(edit, s, time.ctime()) |
alias weer='function _weer(){ echo "Getting weather for $1"; curl wttr.in/$1; };_weer' |
#!/bin/bash | |
GIST_ID=${1} | |
cd ~/bin | |
git clone https://gist.github.com/${GIST_ID}.git | |
for entry in "$GIST_ID"/* | |
do |
![][1]
In the world of text editors, there's a plethora of options out there. If you've ever Googled "how to edit HTML sites" or some such, you know what we mean. Allow us, then, to introduce you to VIM, a free website editor that offers many of the same features as Adobe Dreamweaver, and runs on just about every desktop platform. Specifically, it comes by default on the vast majority of Linux distributions, OS X and commercial Unix systems. (It's available to install on Windows, too.) And did we mention it's free? That command line UI isn't necessarily self-explanatory, though, so join us after the break for a quick crash course to help you get started.
If you're running OS X or Linux, start out by opening a terminal. Now type "vim" et voilà: you're using VIM and you didn't even install it. Using Windows? Head over [here][2] and grab the binaries for Windows. Double-click the installer and you'll have VIM on Windows in no time.
People
![]() :bowtie: |
😄 :smile: |
😆 :laughing: |
---|---|---|
😊 :blush: |
😃 :smiley: |
:relaxed: |
😏 :smirk: |
😍 :heart_eyes: |
😘 :kissing_heart: |
😚 :kissing_closed_eyes: |
😳 :flushed: |
😌 :relieved: |
😆 :satisfied: |
😁 :grin: |
😉 :wink: |
😜 :stuck_out_tongue_winking_eye: |
😝 :stuck_out_tongue_closed_eyes: |
😀 :grinning: |
😗 :kissing: |
😙 :kissing_smiling_eyes: |
😛 :stuck_out_tongue: |
//https://askubuntu.com/questions/809590/automatically-get-different-terminal-colors-each-time-i-open-terminal | |
//add to .bashrc | |
#Change color according to the number of Bash shells opened | |
#Creates the .Bash_Color_Changer file if it's not present | |
if ! [ -f ~/.Bash_Color_Changer ]; then | |
echo ORIGINAL > ~/.Bash_Color_Changer | |
fi | |
#Array holding the name of the profiles: Substitute it for the names you're using |
/*------------------------------------------------------------------------ | |
File : Export table headers | |
Purpose : Gist for exporting table headers in Progress OpenEdge | |
Description : | |
Author(s) : Johan Vergeer. With thanks to TheDropper at | |
https://stackoverflow.com/questions/44204335/how-to-add-column-name-while-export-csv-in-progress-4gl#44205839 | |
Created : 6 december 2017 | |
----------------------------------------------------------------------*/ | |
DEF VAR hTable AS HANDLE NO-UNDO. |
@Test | |
@Sql(scripts = {"/create_devices.sql"}, executionPhase = Sql.ExecutionPhase.BEFORE_TEST_METHOD) | |
@Sql(scripts = {"/remove_devices.sql"}, executionPhase = Sql.ExecutionPhase.AFTER_TEST_METHOD) | |
public void create_shouldFailWhenTheSameDeviceIsAddedASecondTime() throws Exception { | |
final ResultActions secondResultActions = mockMvc.perform(post("/devices") | |
.contentType(APPLICATION_JSON) | |
.content(objectMapper.writeValueAsString(bulkDeviceUploadRequestWithDeviceThatWeAlreadyKnow()))) | |
.andExpect(status().isOk()); | |
expectSingleError(secondResultActions, DEVICE_INTERNAL_ID_DUPLICATE, new Error("DEVICE.UPLOAD.ERROR.DEVICE_EXISTS", "Device already known in the system.")); |