This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# example merging 4 commits | |
git checkout mybranch | |
git rebase -i mybranch~4 mybranch | |
# at the interactive screen | |
# choose fixup for commit: 2 / 3 / 4 | |
git push -u origin +mybranch |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var myFolder = Folder.selectDialog("Select a folder with InDesign files"); | |
if (!myFolder) | |
exit(0); | |
var myFileList = myFolder.getFiles(); | |
for (var i = 0; i < myFileList.length; i++) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
main () | |
function main () { | |
// create a path for a file object | |
var curFile = File ( "~/Desktop/myTemplate.indt" ); | |
// check if the file exists | |
if (!curFile.exists) { | |
alert ( "no template!" ); | |
exit(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Laravel 5.5/5.6 | |
// AppServiceProvider | |
public function boot() { | |
// If we have a database table with configs... | |
if (Schema::hasTable('table_with_config')) { | |
// Get all database stored configs | |
// DatabaseConfigs is a Model |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Found on stackoverflow from: https://stackoverflow.com/users/5641227/khalil-gharbaoui | |
This command should let you explore a running docker container: | |
docker exec -it name-of-container bash | |
once inside do: | |
ls -lsa | |
or any other bash command like: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require('fs') | |
const path = require('path') | |
const createSymlink = require('create-symlink') | |
const appDir = path.dirname(require.main.filename) | |
const original = /*...*/ | |
const link = /*...*/ | |
if (!fs.existsSync(original)) { | |
console.error('Can not create symlink. Original folder does not exist!') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
convert -density 1200 source.pdf -resize 25% -background white -alpha remove -append resultimage.jpg |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public static function countCapitalLetters($string){ | |
$lowerCase = mb_strtolower($string); | |
return strlen($lowerCase) - similar_text($string, $lowerCase); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Change background color */ | |
input:-webkit-autofill { | |
-webkit-box-shadow: 0 0 0 30px white inset; | |
} | |
/* Change text color */ | |
input:-webkit-autofill { | |
-webkit-text-fill-color: black !important; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"id": "aaron-bond.better-comments", | |
"name": "better-comments", | |
"publisher": "aaron-bond", | |
"version": "3.0.2" | |
}, | |
{ | |
"id": "adamgirton.gloom", | |
"name": "gloom", |