Clone all branches in a repository at once. Add extra .git
to clone without main directory.
git clone --bare https://gitgub.com/user/repo.git .git
Convert to regular github project
git config -- bool core.bare false
$Folder = 'C:\path\to\media\'; | |
$sec = 0 | |
$min = 0 | |
$hr = 0 | |
$len = @() | |
Get-ChildItem -Recurse | ForEach-Object { | |
$File = $_.Name; |
#include <iostream> | |
struct CD { | |
int trackNumber; | |
CD * nextSong; | |
CD(int selection, CD * track) { | |
trackNumber = selection; | |
nextSong = track; | |
} | |
}; |
#include <stdio.h> | |
int egcd(int a, int b, int *x, int *y) { | |
if (a == 0) { | |
*x = 0; | |
*y = 1; | |
return b; | |
} |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <time.h> | |
#include <ctype.h> | |
#include <curl/curl.h> | |
void fetch_web_data(struct web_data *chunk, char *address); | |
static size_t write_mem(void *contents, size_t size, size_t n, void *userp); |
#include<iostream> | |
using namespace std; | |
extern "C" void examplefunction(double arg1); | |
int main(void) { | |
examplefunction(100); | |
} | |
void examplefunction(double arg1) { |
# fatal: No configured push destination | |
# # Remote #local:#remote branch | |
git push --set-upstream https://github.com/username/repo.git master:master | |
# use `--force` flag on conflict |
import urllib.request | |
url = 'https://www.somewebsite.com/somefile' | |
req = urllib.request.Request(url, method='HEAD') | |
res = urllib.request.urlopen(req) | |
filename = res.info().get_filename() | |
urllib.request.urlretreve(url, f"/target/dir/{filename}") |
pattern | description |
---|---|
(?=subexp) | look-ahead |
(?!subexp) | negative look-ahead |
(?<=subexp) | look-behind |
(? |
#!/bin/bash | |
curl -u "$1" https://api.github.com/user/repos -d "{\"name\":\"$2\"}" | |
git init | |
git remote add origin "https://github.com/$1/$2.git" | |
touch README.md | |
echo 'cli-push-remote-repo.sh' >> .gitignore | |
echo '.gitignore' >> .gitignore |