Skip to content

Instantly share code, notes, and snippets.

View testman42's full-sized avatar
:octocat:
Converting caffeine into code

testman42

:octocat:
Converting caffeine into code
View GitHub Profile
@derhuerst
derhuerst / output.js
Created May 10, 2016 10:22
how fetch a GitHub user's stars
[
{
owner: 'bcoe',
repo: 'top-npm-users',
description: ':star: Generate a list of top npm users by based on monthly downloads.',
language: 'JavaScript',
isFork: false,
stargazers: 27,
watchers: 27
}
@baybatu
baybatu / limit-number.py
Created June 26, 2016 06:27
Limiting input number between minimum and maximum values range in Python
def limit(num, minimum=1, maximum=255):
"""Limits input 'num' between minimum and maximum values.
Default minimum value is 1 and maximum value is 255."""
return max(min(num, maximum), minimum)
# coding: utf-8
# Imports
import os
import cPickle
import numpy as np
import theano
import theano.tensor as T
@Koncord
Koncord / server.lua
Created July 23, 2016 14:21
Example for TES3MP GUI
function OnPlayerSendMessage(pid, message)
local pname = tes3mp.GetName(pid)
print(pname.."("..pid.."): "..message)
if myMod.OnPlayerMessage(pid, message) == 0 then
return 0
end
if message:sub(1,1) == '/' then
local cmd = (message:sub(2, #message)):split(" ")
@fstab
fstab / MATRIX.md
Last active January 5, 2022 12:31
How to use matrix.org and vector.im as an IRC client

How to use matrix.org and vector.im as an IRC client

How to Join an IRC Channel on matrix.org

Join the room #freenode_<#channel>:matrix.org, replacing <#channel> with the name of the IRC channel. For example, in order to join the #prometheus IRC channel, join the room #freenode_#prometheus:matrix.org on matrix.org.

In vector.im, rooms can be joined with the directory symbol on the bottom left.

@juusechec
juusechec / install.sh
Last active April 27, 2018 18:58
Universal Install Script https://xkcd.com/1654/
#!/bin/bash
pip install "$1" &
easyinstall "$1" &
brew install "$1" &
npm install "$1" &
yum install "$1" & dnf instal "$1" &
docker run "$1" &
pkg install "$1" &
apt-get install "$1" &
@NotSoSuper
NotSoSuper / help.lua
Last active June 9, 2026 22:37
NotSoBot Help Documentation
Complete command list of NotSoBot <439205512425504771>:
Owner: NotSoSuper <296044494812479498>
Prefix: .
* = Not Required
^ = Bot Owner Only
^^ = Server Admin Only
"/'s" in commands show aliases for the command (Ex: ".reverse/r <text>" Command can be run with .reverse or .r)
<max_messages> = The number of messages to search through
<image> = The image URL, @discord_user, the users name, discord/custom emoji, or, nothing inputted which will search through 25 messages for embeds or attachments
<image-face> = Image requires a HUMAN FACE to be included
@Koncord
Koncord / build.sh
Last active June 30, 2019 23:12
RPI v3 build scripts
source build_env.sh
./clone-or-rebase.sh https://github.com/TES3MP/RakNet RakNet
mkdir ./RakNet/build
cd ./RakNet/build
cmake CMAKE_INSTALL_PREFIX=$RPI_ROOT/libs -DRAKNET_ENABLE_SAMPLES=False -DRAKNET_ENABLE_DLL=False ..
make -j4 install
cd ../..
./clone-or-rebase.sh https://github.com/TES3MP/openmw-tes3mp openmw-tes3mp
@sebble
sebble / stars.sh
Last active August 3, 2026 01:05
List all starred repositories of a GitHub user.
#!/bin/bash
USER=${1:-sebble}
STARS=$(curl -sI https://api.github.com/users/$USER/starred?per_page=1|egrep '^Link'|egrep -o 'page=[0-9]+'|tail -1|cut -c6-)
PAGES=$((658/100+1))
echo You have $STARS starred repositories.
echo
@Koncord
Koncord / build.sh
Created February 21, 2017 14:34
Build luasql
#################################################
export sqlitever=3150200
export luatarget=linux #linux mingw
export luasqltargets="sqlite3 mysql"
#################################################
git clone https://github.com/keplerproject/luasql
mkdir -p downloads