Skip to content

Instantly share code, notes, and snippets.

View Jakesta13's full-sized avatar
🐬
Take a moment to appreciate what you've got

Jake Jakesta13

🐬
Take a moment to appreciate what you've got
  • Canada, Toronto
View GitHub Profile
@idiosync
idiosync / mcgenerate.sh
Created March 29, 2012 03:31
Script to generate terrain and render maps from Minecraft seeds.
#!/bin/bash
#set -e
USAGE="Usage: ${0} [options]
Uses mcexplore.py to explore a seed, and c10t to make a number of maps of that seed.
Requires:
mcexplore.py (https://gist.github.com/854679)
@BilalBudhani
BilalBudhani / rssToJson
Created January 31, 2013 10:04
PHP function to convert simple RSS to JSON
public function Parse ($url) {
$fileContents= file_get_contents($url);
$fileContents = str_replace(array("\n", "\r", "\t"), '', $fileContents);
$fileContents = trim(str_replace('"', "'", $fileContents));
$simpleXml = simplexml_load_string($fileContents);
$json = json_encode($simpleXml);
return $json;
}
@iandundas
iandundas / new_gist_file
Created May 20, 2013 04:39
PHP: Relay POST and GET requests to a new URL, and output the result
<?php
// was used when API address moved but apps were live on app store.
$ch = curl_init();
$path = $_SERVER['REQUEST_URI'];
$path = str_replace('/api/index.php','',$path);
$path = str_replace('/api/','/',$path);
@TylerFisher
TylerFisher / hosting-on-github.md
Last active May 18, 2024 16:16
Basic steps for hosting on Github

Hey there, apparently people are still using this Gist from 2013! It's out of date! Consult the Github docs.

Steps for Hosting a Website on GitHub

  1. Create a GitHub account on github.com.
  2. Download either [GitHub for Mac][1] or [GitHub for Windows][2], depending on your operating system. Open the app and log in using the account you just created.
  3. (On Mac): After you login, click advanced and make sure that your name and email are correct. Then, click "Install Command Line Tools", just in case you want to start using the command line later in life.
  4. Create a new repository in your GitHub application. Name it your-username.github.io. The name is very important. Note the folder that GitHub is saving the repository to. Make sure the "Push to GitHub?" box is checked.
  5. Move your website's files into the folder that GitHub just created when you made the repository. IMPORTANT: Your homepage HTML file must be called "index.html", and it must exist in the top-level
@mbasaglia
mbasaglia / rcon.sh
Created June 5, 2014 21:04
A shell script which executes rcon commands
#!/bin/bash
SERVER='localhost'
PORT='26000'
PASSWORD='foo'
SECURE=0
SECURE_PORT="1234"
RCON_HEADER=$(echo -e "\xff\xff\xff\xff")
ESCAPE_CHAR=$(echo -en "\x1b")
@TerrorBite
TerrorBite / ircbotframe.py
Last active February 20, 2023 05:21
Python IRC chat bridge for Vanilla Minecraft
import socket
import threading
import re
import time
class ircOutputBuffer:
# Delays consecutive messages by at least 1 second.
# This prevents the bot spamming the IRC server.
def __init__(self, irc):
self.waiting = False
@Nilpo
Nilpo / Using Git to Manage a Live Web Site.md
Last active April 26, 2024 19:09
Using Git to Manage a Live Web Site

Using Git to Manage a Live Web Site

Overview

As a freelancer, I build a lot of web sites. That's a lot of code changes to track. Thankfully, a Git-enabled workflow with proper branching makes short work of project tracking. I can easily see development features in branches as well as a snapshot of the sites' production code. A nice addition to that workflow is that ability to use Git to push updates to any of the various sites I work on while committing changes.

Contents

@MichaelLawton
MichaelLawton / deleteAmazonSavedItems.js
Last active June 12, 2024 15:38
Removes all Amazon saved for later items on the cart page. It will only remove visible items. You might want to scroll first to make more items visible. To use paste code in developer console (Ctrl+Shift+J or Cmd+Opt+J in Chrome) then press enter.
function deleteSavedItems() {
var query = document.querySelectorAll("#sc-saved-cart input[value=Delete]")
if (query.length) {
query[0].click();
}
if (query.length > 1) {
setTimeout(deleteSavedItems,100);
}
else {
console.log('Finished');
@jniltinho
jniltinho / install_ffmpeg-obs_opensuse.sh
Last active September 6, 2021 22:08
Install FFMPEG GIT + NVENC + OBS -- OpenSUSE 42.2
#!/bin/bash
## Install FFMPEG GIT + OBS GIT OpenSUSE 42.2 64Bits
## http://www.diolinux.com.br/2016/07/como-instalar-o-ffmpeg-nvenc-no-ubuntu.html
## Pacote Compilado no GITHUB: https://github.com/jniltinho/oficinadotux/tree/master/ffmpeg_nvenc/opensuse
## Run as root (sudo su)
## Links
## http://www.regataos.com.br/
## https://gist.github.com/Brainiarc7/4b49f463a08377530df6cecb8171306a
## https://developer.nvidia.com/ffmpeg
@IISResetMe
IISResetMe / pingasync.ps1
Last active October 28, 2023 02:55
Task-based async Ping in PowerShell
# Define list of remote hosts (can be host names or IPs)
$RemoteHosts = @('www.google.com')
# Initiate a Ping asynchronously per remote host, pick up the result task objects
$Tasks = foreach($ComputerName in $RemoteHosts) {
(New-Object System.Net.NetworkInformation.Ping).SendPingAsync($ComputerName)
}
# Wait for all tasks to finish
[System.Threading.Tasks.Task]::WaitAll($Tasks)