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
<div class="col-md-3 col-xs-12"> | |
Sidebar | |
</div> | |
<div class="col-md-9 col-xs-12"> | |
Content | |
</div> |
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
function clone(obj) { | |
var ctr = Object.getPrototypeOf(obj).constructor; | |
return Object.assign(new ctr(), obj); | |
} |
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 films = [{ | |
title: 'El señor de los anillos', | |
year: 2008, | |
cast: [ | |
'Christian Bale', | |
'Heath Ledger', | |
'Aaron Eckhart', | |
'Michael Cane', | |
'Gary Oldman', | |
'Morgan Freeman' |
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 loadModule = (filename, module, require) => { | |
const wrappedSrc = `(function(module, exports, require) { | |
${fs.readFileSync(filename, 'utf8')} | |
})(module, module.exports, require);` | |
eval(wrappedSrc) | |
} | |
const require = (moduleName) => { | |
console.log(`Require invoked for módule: ${moduleName}`) | |
const id = require.resolve(moduleName) |
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
# Create a backup of the corrupt directory: | |
cp -R foo foo-backup | |
# Make a new clone of the remote repository to a new directory: | |
git clone git@www.mydomain.de:foo foo-newclone | |
# Delete the corrupt .git subdirectory: | |
rm -rf foo/.git | |
# Move the newly cloned .git subdirectory into foo: | |
mv foo-newclone/.git foo | |
# Delete the rest of the temporary new clone: | |
rm -rf foo-newclone |
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
package main | |
import ( | |
"time" | |
"log" | |
"github.com/zucchinidev/runnerWork/runner" | |
"os" | |
) | |
const timeout = 3 * time.Second |
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
package main | |
import ( | |
"log" | |
"github.com/zucchinidev/work/work" | |
"sync" | |
"time" | |
) | |
var names = []string{ |
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
// newFile 24-25MB | |
dd if=/dev/urandom of=newfile bs=1M count=24 |
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
export class RetryRequest { | |
private maxRetries: number[]; | |
constructor(private timeout: number, maxRetries = 10) { | |
this.maxRetries = [...Array(maxRetries)].map((_, i) => i) | |
} | |
wait(timeout: number) { | |
return new Promise((resolve) => setTimeout(() => resolve(), timeout)) | |
} |
OlderNewer