Skip to content

Instantly share code, notes, and snippets.

View Gesugao-san's full-sized avatar
💭
⌈Wired Sound for Wired People⌋

Gesugao-san

💭
⌈Wired Sound for Wired People⌋
View GitHub Profile
@robschmuecker
robschmuecker / README.md
Last active October 19, 2024 14:15
Multiple Parent Nodes D3.js

Multi Link Example for http://www.robschmuecker.com/d3-js-drag-and-drop-zoomable-tree/#comment-6190

Added an additional link between nodes at the bottom of the dndTree.js file.

This example pulls together various examples of work with trees in D3.js.

The panning functionality can certainly be improved in my opinion and I would be thrilled to see better solutions contributed.

One can do all manner of housekeeping or server related calls on the drop event to manage a remote tree dataset for example.

@caseywatts
caseywatts / bookmarkleting.md
Last active April 12, 2025 09:23
Making Bookmarklets

This is one chapter of my "Chrome Extension Workshops" tutorial, see the rest here: https://gist.github.com/caseywatts/8eec8ff974dee9f3b247

Unrelated update: my book is out! Debugging Your Brain is an applied psychology / self-help book

Making Bookmarklets

I'm feeling very clever. I've got this sweet line of javascript that replaces "cloud" with "butt". My mom would LOVE this, but she doesn't computer very well. I'm afraid to show her the Developer Console and have her type/paste this in. But she IS pretty good at bookmarks, she knows just how to click those!

A bookmark normally takes you to a new web page. A bookmarklet is a bookmark that runs javascript on the current page instead of taking you to a new page. To declare that it is a bookmarklet, the "location" it points to starts with javascript:.

@mcandre
mcandre / public-trackers.md
Last active January 21, 2025 19:02
List of public BitTorrent tracker announce URLs
@codeboy
codeboy / gist:923f74b72abda9502f42
Created February 1, 2015 15:50
A very simple example of python code to us with python-libtorrent
'''
You should try libtorrent (rasterbar). http://libtorrent.org
If you want to write your client in python, on linux, install it with:
sudo apt-get install python-libtorrent
A very simple example of python code to use it to download a torrent:
'''
import libtorrent as lt
@phrawzty
phrawzty / 2serv.py
Last active January 16, 2025 08:46
simple python http server to dump request headers
#!/usr/bin/env python2
import SimpleHTTPServer
import SocketServer
import logging
PORT = 8000
class GetHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
@nuthanmunaiah
nuthanmunaiah / marshal.py
Last active February 18, 2023 17:00
Python module to serialize and deserialize networkx DiGraph objects to and from a JSON file.
import jsonpickle
import networkx
from networkx.readwrite import json_graph
def serialize(call_graph, file_path):
'''Function to serialize a NetworkX DiGraph to a JSON file.'''
if not isinstance(call_graph, networkx.DiGraph):
raise Exception('call_graph has be an instance of networkx.DiGraph')
@kevinhikaruevans
kevinhikaruevans / electron-boilerplate NSIS template with portable option
Last active June 16, 2024 01:56
NSIS template for electron-boilerplate with portable installation option
; --------------------------------
; NSIS packaging/install script with portable option!
; Docs: http://nsis.sourceforge.net/Docs/Contents.html
; Made for electron-boilerplate
; Based off this answer by Anders:
; https://stackoverflow.com/questions/13777988/use-nsis-to-create-both-normal-install-and-portable-install
; --------------------------------
; --------------------------------
; Variables
@phoenixlzx
phoenixlzx / nt.md
Last active April 16, 2025 19:18
Project NyaaTracker

NyaaTracker is an open and free bittorrent tracker for everyone.

Usage

Simply add one of the following tracker address to your torrent file and all set:

  • http://t.nyaatracker.com:80/announce
  • udp://t.nyaatracker.com:80/announce

Features

@ishu3101
ishu3101 / gist_to_github_repo.md
Created November 24, 2015 08:35
Transfer a gist to a GitHub repository

Transfer a gist to a GitHub repository

clone the gist

git clone https://gist.github.com/ishu3101/6fb35afd237e42ef25f9

rename the directory

mv 6fb35afd237e42ef25f9 ConvertTo-Markdown

change the working directory to the newly renamed directory

cd ConvertTo-Markdown

@jonschlinkert
jonschlinkert / markdown-toc_repeated-headings.md
Created December 15, 2015 19:42
Example table of contents generated by markdown-toc, correctly links repeated headings.