Skip to content

Instantly share code, notes, and snippets.

@marduk191
marduk191 / xcompose.py
Last active November 13, 2024 04:25
Comfyui Tranformers node for internlm-xcomposer2-4khd-7b
import torch
import os
import folder_paths
from transformers import AutoModel, AutoTokenizer
class InternLMXComposer2:
def __init__(self):
self.device = "cuda" if torch.cuda.is_available() else "cpu"
self.model = None
self.tokenizer = None
@marduk191
marduk191 / RusRoulette
Last active April 5, 2016 10:36
Russian roulette
#!/bin/bash
## Russian Roulette
## By marduk191
## email: [email protected]
#comment these out if you use an external list below
#live[0]="You live bitch!"
#live[1]="You haven't died YET!"
#live[2]="Still alive asshole!..."
@marduk191
marduk191 / hasteCLI
Last active March 17, 2016 17:48
A small shellscript for pasting to hastebin from the command line
Hastebin CLI
#Add to ~/.bashrc
haste() { a=$(cat); curl -X POST -s -d "$a" http://hastebin.com/documents | awk -F '"' '{print "http://hastebin.com/"$4}'; }
alias copy="xclip -selection c"
##Usage:
@marduk191
marduk191 / bconv.nemo_action
Last active March 15, 2016 21:32
Nemo action for converting bash scripts to binary from the right click menu. (uses shc)
[Nemo Action]
Name=bash2bin
Comment=Convert "%N" to binary
Exec=gnome-terminal --working-directory=%P -e "shc -f %F -o binary_out -r"
Icon-Name=gtk-execute
Selection=notnone
Extensions=sh;bash;
Quote=double
@marduk191
marduk191 / vh_termbin_install.sh
Last active November 11, 2021 02:49
This is a shell script to install command line "termbin" online paste service from virtualhacker.net
#!/bin/bash
## Termbin installer
## By marduk191
## email: [email protected]
printf "%s\n" "Checking dependencies"
if ! dpkg-query -W netcat | grep .
then printf "%s\n" "netcat isn't installed. Setting up netcat."
gksudo apt-get install netcat
@marduk191
marduk191 / push
Created February 6, 2016 07:32
My kodi release script
#!/bin/bash
## Kodi Repo tool frontend
## By marduk191
## email: [email protected]
while getopts ":sf" flags;
do
case $flags in
s)
git add .
git commit -a
@marduk191
marduk191 / addon3.xml
Created February 6, 2016 06:44
Kodi repository addon.xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="repository.yourname" name="Your Addons" version="0.1.2" provider-name="You">
<extension point="xbmc.addon.repository" name="Your addons">
<info compressed="false">https://raw.githubusercontent.com/you/your_repo_folder/master/addons.xml</info>
<checksum>https://raw.githubusercontent.com/you/your_repo_folder/master/addons.xml.md5</checksum>
<datadir zip="true">https://raw.githubusercontent.com/you/your_repo_folder/master/</datadir>
</extension>
<extension point="xbmc.addon.metadata">
<summary lang="en_GB">Your Kodi Addons</summary>
<description lang="en_GB">Your Kodi repository description.</description>
@marduk191
marduk191 / addon.xml
Created February 6, 2016 06:31
Kodi addon.xml template 2
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--See http://kodi.wiki/view/Addon.xml for more information -->
<addon
id="plugin.video.id"
name="your cool addon"
version="1.2.3"
provider-name="Your name or organization">
<!--include all libraries that your plugin will require below. This will tell Kodi what to pull for you -->
<!-- http://kodi.wiki/view/Addon.xml#.3Crequires.3E -->
@marduk191
marduk191 / du_4.4.xml
Last active August 29, 2015 14:07
Presto: Dirty Unicorns 4.4.4 manifest
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="marduk191/android_device_pantech_presto" path="device/pantech/presto" remote="github" revision="du4.4" />
<project name="PantechDevTeam/android_device_pantech_msm8x60-common" path="device/pantech/msm8x60-common" remote="github" revision="cm-11.0" />
<project name="PantechDevTeam/android_device_pantech_msm8660-common" path="device/pantech/msm8660-common" remote="github" revision="cm-11.0" />
<project name="PantechDevTeam/android_kernel_pantech_msm8660-common" path="kernel/pantech/msm8660-common" remote="github" revision="cm-11.0" />
<project name="PantechDevTeam/android_vendor_pantech_msm8x60-common" path="vendor/pantech/msm8x60-common" remote="github" revision="cm-11.0" />
<project name="PantechDevTeam/android_vendor_pantech_presto" path="vendor/pantech/presto" remote="github" revision="cm-11.0" />
<remove-project name="android_bootable_recovery" />
<remove-project name="frameworks_base" />
@marduk191
marduk191 / 51-android.rules
Created August 18, 2014 13:18
USB config for adb and fastboot support. gksudo gedit /etc/udev/rules.d/51-android.rules
#Acer
SUBSYSTEM=="usb", ATTR{idVendor}=="0502", MODE="0666"
#ASUS
SUBSYSTEM=="usb", ATTR{idVendor}=="0b05", MODE="0666"
#Dell
SUBSYSTEM=="usb", ATTR{idVendor}=="413c", MODE="0666"
#Foxconn