Skip to content

Instantly share code, notes, and snippets.

@rr948
rr948 / Setting_upa_new_repo.md
Created May 18, 2022 10:08 — forked from alexpchin/Setting_upa_new_repo.md
Create a new repository on the command line

Setting up a new Git Repo

##Create a new repository on the command line

touch README.md
git init
git add README.md
git commit -m "first commit"

git remote add origin [email protected]:alexpchin/.git

<!DOCTYPE html>
<html>
<head>
<script src="js/JQuery.js">
</script>
<script>
$(document).ready(function()
{
$("#btn1").click(function(){
$("#box").animate({height:"300px"});
@rr948
rr948 / .block
Created September 29, 2021 22:21 — forked from mbostock/.block
Radial Cluster Dendrogram
license: gpl-3.0
height: 950
border: no
@rr948
rr948 / file_list.groovy
Created August 6, 2021 19:19 — forked from yangkun/file_list.groovy
[groovy] list dirs/files (dir first and sort as name)
import groovy.io.*
def listfiles(dir) {
dlist = []
flist = []
new File(dir).eachDir {dlist << it.name }
dlist.sort()
new File(dir).eachFile(FileType.FILES, {flist << it.name })
flist.sort()
return (dlist << flist).flatten()
@rr948
rr948 / create_github_files.sh
Created January 23, 2021 12:53 — forked from aslakhellesoy/create_github_files.sh
Can't create a new empty file on GitHub using API
# This works
curl -u USER:PASS https://api.github.com/repos/USER/REPO/contents/a.txt --request PUT --data-ascii $'{"path": "a.txt", "content": "bXkgbmV3IGZpbGUgY29udGVudHM=", "message": "hello"}'
# Does not work
curl -u USER:PASS https://api.github.com/repos/USER/REPO/contents/a.txt --request PUT --data-ascii $'{"path": "a.txt", "content": "", "message": "hello"}'
# HTTP status 422. Body:
# {
# "message": "content is not valid Base64",
# "documentation_url": "http://developer.github.com/v3/repos/contents/"