Skip to content

Instantly share code, notes, and snippets.

View genedna's full-sized avatar
🦀
Rust !

Quanyi Ma genedna

🦀
Rust !
View GitHub Profile
@bryanbraun
bryanbraun / git-branching-diagram.md
Last active April 16, 2024 14:18
Example Git Branching Diagram

Example Git Branching Diagram

You can use this diagram as a template to create your own git branching diagrams. Here's how:

  1. Create a new diagram with diagrams.net (formerly draw.io)
  2. Go to File > Open From > URL
  3. Insert this url (it points to the xml data below): https://gist.githubusercontent.com/bryanbraun/8c93e154a93a08794291df1fcdce6918/raw/bf563eb36c3623bb9e7e1faae349c5da802f9fed/template-data.xml
  4. Customize as needed for your team.

@jborichevskiy
jborichevskiy / jon-roam-daily-template.md
Last active August 31, 2022 04:41
The daily template I use for Roam Research https://roamresearch.com/
  • Weekly Agenda (created on a different day, and embedded with /Block Reference)
  • [[Morning Questions]]
    • {{[[slider]]}} How many hours of sleep did I get?
    • What's one thing top of mind today?
    • What's the one thing I need to get done today to make progress?
    • Review #[[Index: Questions]] #values
  • Agenda
    • {{[[TODO]]}} Morning walk #goal-health #habit
    • {{[[TODO]]}} Check calendar for scheduled events
  • {{[[TODO]]}} Morning focus hour
@Neo23x0
Neo23x0 / audit.rules
Last active January 13, 2024 14:12
Linux Auditd Best Practice Configuration
# IMPORTANT!
# This gist has been transformed into a github repo
# You can find the most recent version there:
# https://github.com/Neo23x0/auditd
# ___ ___ __ __
# / | __ ______/ (_) /_____/ /
# / /| |/ / / / __ / / __/ __ /
# / ___ / /_/ / /_/ / / /_/ /_/ /
# /_/ |_\__,_/\__,_/_/\__/\__,_/
@turtlemonvh
turtlemonvh / Makefile
Last active January 23, 2024 03:33
Golang Project Makefile Template
# Borrowed from:
# https://github.com/silven/go-example/blob/master/Makefile
# https://vic.demuzere.be/articles/golang-makefile-crosscompile/
BINARY = superdo
VET_REPORT = vet.report
TEST_REPORT = tests.xml
GOARCH = amd64
VERSION?=?
@jonasschneider
jonasschneider / server.go
Created February 17, 2013 00:54
Go SSH server attempt (non-functional)
package main;
import(
"code.google.com/p/go.crypto/ssh"
"io/ioutil"
"fmt"
"io"
"os/exec"
"os"
)
@jedy
jedy / go_scp.go
Last active May 31, 2022 07:20
an example of scp in golang
// https://blogs.oracle.com/janp/entry/how_the_scp_protocol_works
package main
import (
"fmt"
"golang.org/x/crypto/ssh"
)
const privateKey = `content of id_rsa`
@gfreezy
gfreezy / capture_webpage_as_picture.py
Created September 12, 2011 08:01
capture an webpage as a picture with pyqt4
import sys
from PyQt4.QtCore import (pyqtSlot, pyqtSignal, QObject, QSize, QUrl,
SIGNAL)
from PyQt4.QtGui import (QApplication, QImage, QPainter)
from PyQt4.QtWebKit import QWebPage
class Thumbnailer(QObject):
finished = pyqtSignal()
def __init__(self, parent=None):
@eligrey
eligrey / gist:1079572
Created July 13, 2011 01:47
BlobBuilder.js
@scottjehl
scottjehl / jqm-self-init-a-widget.js
Created July 8, 2011 14:29
Self-init a jQuery Mobile plugin
// First, let's define a widget/plugin called "foo"
// Either using jQuery's $.fn plugin namespace, for simple stateless plugins...
$.fn.foo = function(){
// In this scope, this refers to the element on which the plugin foo() was called
// manipulate it and return this at the end, so it can be chainable
};
@romannurik
romannurik / centered_triangle.html
Created May 3, 2011 05:43
A simple CSS trick to create a horizontally- or vertically-centered 'selected' callout triangle using zero images.
<!DOCTYPE html>
<html>
<head>
<style>
body {
margin: 40px;
}
a {
display: inline-block;