Skip to content

Instantly share code, notes, and snippets.

@00mjk
00mjk / clip.html
Created November 21, 2021 18:14 — forked from 383366063/clip.html
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="utf-8" />
<title>clip_CSS参考手册_web前端开发参考手册系列</title>
<meta name="author" content="Joy Du(飘零雾雨), dooyoe@gmail.com" />
<meta name="copyright" content="www.doyoe.com" />
<style>
.test{position:absolute;height:50px;line-height:50px;clip:rect(0 auto 35px 10px);background:#eee;}
</style>
@00mjk
00mjk / plurality.c
Created November 27, 2021 16:57 — forked from deeunix/plurality.c
my Cs50 plurality solution
#include <cs50.h>
#include <stdio.h>
#include <string.h>
// Max number of candidates
#define MAX 9
// Candidates have name and vote count
typedef struct
{
@00mjk
00mjk / plurality.c
Created November 27, 2021 16:57 — forked from LoveBexa/plurality.c
cs50 pset3 plurality
#include <cs50.h>
#include <stdio.h>
#include <string.h>
// Max number of candidates
#define MAX 9
// Candidates have name and vote count
typedef struct
{
@00mjk
00mjk / interjection.txt
Created December 2, 2021 16:09 — forked from oofdere/interjection.txt
Windows Core OS.iso
I'd just like to interject for a moment. What you're referring to as Windows,
is in fact, GNU/NT, or as I've recently taken to calling it, GNU plus NT.
Windows NT is not an operating system unto itself, but rather a proprietery component
of a fully functioning GNU system made useful by the GNU corelibs, shell
utilities and vital system components comprising a full OS as defined by POSIX.
Many computer users run a modified version of the GNU system every day,
without realizing it. Through a peculiar turn of events, the version of GNU
which is widely used today is often called "Windows NT", and many of its users are
not aware that it is basically the GNU system, developed by the GNU Project.
@00mjk
00mjk / git.migrate
Created December 5, 2021 20:11 — forked from niksumeiko/git.migrate
Moving git repository and all its branches, tags to a new remote repository keeping commits history
#!/bin/bash
# Sometimes you need to move your existing git repository
# to a new remote repository (/new remote origin).
# Here are a simple and quick steps that does exactly this.
#
# Let's assume we call "old repo" the repository you wish
# to move, and "new repo" the one you wish to move to.
#
### Step 1. Make sure you have a local copy of all "old repo"
### branches and tags.
@00mjk
00mjk / widget.js
Created December 7, 2021 19:16 — forked from lukencode/widget.js
Starter template for creating jsonp embeddable widgets.
(function () {
var scriptName = "embed.js"; //name of this script, used to get reference to own tag
var jQuery; //noconflict reference to jquery
var jqueryPath = "http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js";
var jqueryVersion = "1.8.3";
var scriptTag; //reference to the html script tag
/******** Get reference to self (scriptTag) *********/
var allScripts = document.getElementsByTagName('script');
"""
Exports Issues from a specified repository to a CSV file
Uses basic authentication (Github username + password) to retrieve Issues
from a repository that username has access to. Supports Github API v3.
"""
import csv
import requests
import json
@00mjk
00mjk / hosting-on-github.md
Created December 9, 2021 20:18 — forked from TylerFisher/hosting-on-github.md
Basic steps for hosting on Github

Hey there, apparently people are still using this Gist from 2013! It's out of date! Consult the Github docs.

Steps for Hosting a Website on GitHub

  1. Create a GitHub account on github.com.
  2. Download either [GitHub for Mac][1] or [GitHub for Windows][2], depending on your operating system. Open the app and log in using the account you just created.
  3. (On Mac): After you login, click advanced and make sure that your name and email are correct. Then, click "Install Command Line Tools", just in case you want to start using the command line later in life.
  4. Create a new repository in your GitHub application. Name it your-username.github.io. The name is very important. Note the folder that GitHub is saving the repository to. Make sure the "Push to GitHub?" box is checked.
  5. Move your website's files into the folder that GitHub just created when you made the repository. IMPORTANT: Your homepage HTML file must be called "index.html", and it must exist in the top-level
@00mjk
00mjk / Stop tracking directory in Git repo
Created December 10, 2021 14:55 — forked from mandiwise/Stop tracking directory in Git repo
A command to stop tracking and entire directory in a Git repo
// Reference: http://stackoverflow.com/questions/936249/stop-tracking-and-ignore-changes-to-a-file-in-git
$ git rm --cached -r <dir>