Thank you everybody, Your comments makes it better
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
# finds all *.js files that have either `</` or `/>` tags in them and renames them to *.jsx | |
find ./src -type f -name '*.js' -not -name '*.jsx' -not -name '*.ejs' -exec bash -c 'grep -l -E "</|/>" "$0"' {} \; -exec bash -c 'mv "$0" "${0%.js}.jsx"' {} \; |
Thank you everybody, Your comments makes it better
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
import forEach from 'lodash/forEach'; | |
/** | |
* Sample Web Service | |
* This is a sample service class that uses fetch and promises. | |
* | |
* I am using the http://httpbin.org endpoint to ensure this example is working properly. | |
* | |
* @class sampleWebService | |
*/ | |
class sampleWebService { |
// Responsiveness | |
$tablet: 769px !default | |
// 960px container + 40px | |
$desktop: 1000px !default | |
// 1152px container + 40 | |
$widescreen: 1192px !default | |
// 960 and 1152 have been chosen because | |
// they are divisible by both 12 and 16 |
exFAT support on macOS seems to have some bugs because my external drives with exFAT formatting will randomly get corrupted.
Disk Utility is unable to repair this at first, but the fix is this:
diskutil list
to find the right drive id.disk1s1
sudo fsck_exfat -d <id from above>
. eg sudo fsck_exfat -d disk1s3
-d
is debug so you'll see all your files output as they're processed.YES
if it gives you the prompt Main boot region needs to be updated. Yes/No?
#!/usr/bin/env bash | |
# Technicolor AG plus VDNT-S Router VDSL2 - (ba)sh IP renewer | |
# This script logs into the router and refreshes the IP address by toggling on | |
# and off the "automatic connection" parameter. | |
# It *NEEDS* to be configured. Please keep reading. | |
# Disable globbing, die on undefined variables and errors | |
set -efu | |
# Configuration |
#!/bin/bash | |
git config branch.autosetuprebase always; | |
for BRANCH in `git for-each-ref --format='%(refname)' refs/heads/ | sed 's~refs/heads/~~g'`; do | |
git config branch.$BRANCH.rebase true; | |
echo "$BRANCH now set up for rebasing" | |
done |
Custom recipe to get OS X 10.10 Yosemite running from scratch, setup applications and developer environment. I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. On average, I reinstall each computer from scratch every 6 months, and I do not perform upgrades between distros.
This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.
You are encouraged to fork this and modify it to your heart's content to match your own needs.
Mini projects by Maxime Euzière (xem), subzey, Martin Kleppe (aemkei), Mathieu Henri (p01), Litterallylara, Tommy Hodgins (innovati), Veu(beke), Anders Kaare, Keith Clark, Addy Osmani, bburky, rlauck, cmoreau, maettig, thiemowmde, ilesinge, adlq, solinca, xen_the,...
(For more info and other projects, visit http://xem.github.io)
(Official Slack room: http://jsgolf.club / join us on http://register.jsgolf.club)
Magic words:
psql -U postgres
Some interesting flags (to see all, use -h
or --help
depending on your psql version):
-E
: will describe the underlaying queries of the \
commands (cool for learning!)-l
: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)