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
cd repository | |
git checkout --orphan orphan_name | |
git rm -rf . | |
rm '.gitignore' | |
echo "#Title of Readme" > README.md | |
git add README.md | |
git commit -a -m "Initial Commit" | |
git push origin orphan_name |
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
for (let i = 0, j = 1, temp; | |
j<300; | |
temp = i, i = j, j = i + temp) | |
{console.log(j);}; |
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 readline = require("readline"); | |
const rl = readline.createInterface({ | |
input: process.stdin, | |
output: process.stdout, | |
}); | |
// ask user for the name input | |
rl.question(`What Fibbonacci sentence do you want to calculate? `, (last_fibbo_sentence) => { |
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
let s = "*"; | |
for (; s.length < 99; s = "*" + s) | |
console.log(s); |
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
set nocompatible " be iMproved, required | |
set autochdir " when making new file, the pwd is the path. not the root. | |
filetype off " required | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
" alternatively, pass a path where Vundle should install plugins | |
"call vundle#begin('~/some/path/here') |
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
$ sudo dnf install libatomic | |
$ sudo ./v symlink |
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
# .bashrc | |
# Source global definitions | |
if [ -f /etc/bashrc ]; then | |
. /etc/bashrc | |
fi | |
# User specific environment | |
if ! [[ "$PATH" =~ "$HOME/.local/bin:$HOME/bin:" ]] | |
then |
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
// Link to main question ==> https://twitter.com/Loc0m0/status/1508697606716764162?s=20&t=Ziozpzj6KIznNArdT9n3xQ | |
const splicer = function () { | |
let accumulator = ""; | |
for (let i = 1; i <= 100_000; i++) { | |
accumulator = accumulator + "0" + i.toString(); | |
} | |
let arrayOfStrings = accumulator.split("0"); | |
let arrayOfNumbers = arrayOfStrings.map(Number); | |
let result = arrayOfNumbers.reduce((sum, current) => sum + current, 0); | |
console.log(result); |
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
// link to the main tweet: https://twitter.com/iam_vee/status/1517357609170386944?s=20&t=MN3UgYbDae5NCTSoeh5mzg | |
var sum = 0, counter = 0, | |
maxTries = 1000_000; | |
for (let i = 1; i <= maxTries; i++) { | |
counter++; | |
while (1) { | |
sum++; | |
if (gimmeRand1to6() == 6) break; | |
} | |
} |
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
import React from 'react'; | |
import ReactDOM from 'react-dom/client'; | |
const root = ReactDOM.createRoot(document.getElementById("root")); | |
const element = <h1> Hello, world </h1>; | |
root.render(element); |
OlderNewer