Project:
project/: A directory named with the project's name which stores the actual Python package__init__pyapp.pysettings.pyurls.pymodels/__init__.pybaes.py
handlers/
| I used to create a github repo MyNotes to store my notes. Now I can skip the GFW and use gist as my notebook. Cool! |
| These commands are based on a askubuntu answer http://askubuntu.com/a/581497 | |
| To install gcc-6 (gcc-6.1.1), I had to do more stuff as shown below. | |
| USE THOSE COMMANDS AT YOUR OWN RISK. I SHALL NOT BE RESPONSIBLE FOR ANYTHING. | |
| ABSOLUTELY NO WARRANTY. | |
| If you are still reading let's carry on with the code. | |
| sudo apt-get update && \ | |
| sudo apt-get install build-essential software-properties-common -y && \ | |
| sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \ |
| version: '3.4' | |
| secrets: | |
| # Find your registration token at: "Your project" > "Settings" > "CI/CD" > "Runners settings" > "Specific Runners" (look for registration token) | |
| # Register it as `GITLAB_REGISTRATION_TOKEN`: `docker secret create GITLAB_REGISTRATION_TOKEN YOUR_REGISTRATION_TOKEN` | |
| GITLAB_REGISTRATION_TOKEN: | |
| external: true | |
| # Find your personal access token at: "Your user account" > "Settings" > "Access Tokens" > "Create personal access token" (for api) | |
| # Register it as `GITLAB_PERSONAL_ACCESS_TOKEN`: `docker secret create GITLAB_PERSONAL_ACCESS_TOKEN <YOUR ACCESS TOKEN>` |
| #coding=utf8 | |
| import itchat | |
| # tuling plugin can be get here: | |
| # https://github.com/littlecodersh/EasierLife/tree/master/Plugins/Tuling | |
| from tuling import get_response | |
| @itchat.msg_register('Text') | |
| def text_reply(msg): | |
| if u'作者' in msg['Text'] or u'主人' in msg['Text']: | |
| return u'你可以在这里了解他:https://github.com/littlecodersh' |
| #!/bin/bash | |
| gitlab_base_url=https://gitlab.com/api/v4/projects | |
| opened_merge_requests=$(curl -H "Authorization: Bearer $GITLAB_PERSONAL_TOKEN" $gitlab_base_url/"$PROJECT_ID"/merge_requests?state=opened) | |
| for iid in $(echo "$opened_merge_requests" | jq '.[] | .iid'); do | |
| curl -X PUT -H "Authorization: Bearer $GITLAB_PERSONAL_TOKEN" $gitlab_base_url/"$PROJECT_ID"/merge_requests/"$iid"/rebase | |
| done |
| git config --global https.proxy http://127.0.0.1:1080 | |
| git config --global https.proxy https://127.0.0.1:1080 | |
| git config --global --unset http.proxy | |
| git config --global --unset https.proxy | |
| npm config delete proxy |
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| import sys, time, threading, abc | |
| from optparse import OptionParser | |
| def parse_options(): | |
| parser = OptionParser() | |
| parser.add_option("-t", action="store", type="int", dest="threadNum", default=1, | |
| help="thread count [1]") |
Project:
project/: A directory named with the project's name which stores the actual Python package
__init__pyapp.pysettings.pyurls.pymodels/
__init__.pybaes.pyhandlers/| # Run this in the project repo from the command-line | |
| # http://stackoverflow.com/a/4593065/99923 | |
| git log --shortstat --author "Xeoncross" --since "2 weeks ago" --until "1 week ago" | grep "files changed" | awk '{files+=$1; inserted+=$4; deleted+=$6} END {print "files changed", files, "lines inserted:", inserted, "lines deleted:", deleted}' |
| FROM ubuntu as ubuntu | |
| RUN apt-get update | |
| RUN apt-get install -y dpkg-dev wget gnupg2 curl | |
| ARG ubuntu_packages="wget htop default-jre-headless apt-transport-https nvidia-container-toolkit cuda-drivers libopengl0 linux-image-extra-virtual omnisci" | |
| WORKDIR /opt/packages/deb | |
| # Nvidia-Docker |