Skip to content

Instantly share code, notes, and snippets.

View forewing's full-sized avatar

forewing

  • Los Santos
View GitHub Profile
@garcia556
garcia556 / get.c
Created December 3, 2017 21:08
POSIX shared memory IPC example (shm_open, mmap), working on Linux and macOS
#include <stdio.h>
#include <sys/mman.h>
#include <fcntl.h>
#include <unistd.h>
#include <string.h>
#define STORAGE_ID "/SHM_TEST"
#define STORAGE_SIZE 32
int main(int argc, char *argv[])
@Elektordi
Elektordi / srcds.py
Created June 8, 2017 15:53
Source RCON client lib converted to Python 3.7
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Reference: https://github.com/frostschutz/SourceLib/blob/master/SourceRcon.py
# Converted to Python3 by Guillaume "Elektordi" Genty (Tested on 3.7)
#------------------------------------------------------------------------------
# SourceRcon - Python class for executing commands on Source Dedicated Servers
# Copyright (c) 2010 Andreas Klauer <[email protected]>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
@Llewellynvdm
Llewellynvdm / getBiblejQueryScript
Last active July 22, 2023 11:15
Here is a jQuery script to make an API call from your own application
jQuery.ajax({
url:'https://archived.getbible.net/json',
dataType: 'jsonp',
data: 'p=John1&v=kjv',
jsonp: 'getbible',
success:function(json){
// set text direction
if (json.direction == 'RTL'){
var direction = 'rtl';
} else {