Skip to content

Instantly share code, notes, and snippets.

View john012343210's full-sized avatar
💭
LearnAsManyAsIcan

Nameeeee john012343210

💭
LearnAsManyAsIcan
View GitHub Profile
@john012343210
john012343210 / mirror_all_githubRepo_to_Gitlab.MD
Last active February 24, 2021 01:46
sync github to gitlab
  • proposal:
    • doesnt use gitlab pull mirror or github action to push
      • approach 0: a script in a server periodically pulling the change from all github repo to local from github and pushing to gitlab.
        • problems
          • required the server to be always running, and it has to contains all the github repos in drive.
    • use gitlab pull mirror:
      • approach 1: when you create a new repo in GitHub, the webhook is sent to a script that could create a GitLab repo, and then setup the mirror
        • problems
          • there is no API to configure the pull mirror in gitlab, so it couldn't be automated.
  • [existing feature request]
@stevecondylios
stevecondylios / resize-image-in-github-issue-github-flavored-markdown.md
Last active April 27, 2024 19:04
How to Resize an Image in a Github Issue (e.g. Github flavored Markdown)

How to Resize an Image in Github README.md (i.e. Github Flavored Markdown)

Percentage:

<img src="https://user-images.githubusercontent.com/16319829/81180309-2b51f000-8fee-11ea-8a78-ddfe8c3412a7.png" width=50% height=50%>

Pixels:

<img src="https://user-images.githubusercontent.com/16319829/81180309-2b51f000-8fee-11ea-8a78-ddfe8c3412a7.png" width="150" height="280">

@andresaaap
andresaaap / config.yml
Created June 17, 2019 19:01
Operationalize a Machine Learning Microservice, CircleCI
# Python CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-python/ for more details
#
version: 2
jobs:
build:
docker:
# Use the same Docker base as the project
- image: python:3.7.3-stretch
@john012343210
john012343210 / answer1.py
Created November 9, 2018 12:07
Check whether the alphabetical array is a subset of another alphabetical array. RUNNING TIME O(n)
import string
def isSubset(arr1,arr2):
d = dict.fromkeys(string.ascii_lowercase, 0)
for i in arr1:
d[i]+=1
for j in arr2:
if d[j] == 0:
return False
@runeimp
runeimp / code_block.md
Created May 24, 2018 19:42
Markdown - JSON Code Block

Code Block Test

JSON

{
    "one": 2,
 "three": {
@obahareth
obahareth / README.md
Created June 11, 2017 10:29
GitHub GraphQL API Starred Repositories With Pagination

GitHub GraphQL API Starred Repositories Examples With Pagination

You can play with the GraphQL API live here. It's pretty nice and has autocompletion based on the GraphQL schema.

The first example gets your first 3 starred repos, the cursor values can be used for pagination.

Here's an example response from the first query:

{
anonymous
anonymous / .block
Created April 27, 2017 20:14
D3.js Drag and Drop Collapsible Tree with Node Editing
license: mit
@adamfeuer
adamfeuer / D3JS Tree Editor.md
Last active November 13, 2023 09:56
d3js tree editor with node create, delete, and rename
We couldn’t find that file to show.
@rkirsling
rkirsling / LICENSE
Last active December 23, 2023 12:54
Directed Graph Editor
Copyright (c) 2013 Ross Kirsling
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions: