Skip to content

Instantly share code, notes, and snippets.

View beppe9000's full-sized avatar

beppe9000

View GitHub Profile
@echo off
:: http://weblogs.asp.net/jgalloway/archive/2006/11/20/top-10-dos-batch-tips-yes-dos-batch.aspx
echo %%~1 = %~1
echo %%~f1 = %~f1
echo %%~d1 = %~d1
echo %%~p1 = %~p1
echo %%~n1 = %~n1
echo %%~x1 = %~x1
echo %%~s1 = %~s1
echo %%~a1 = %~a1
anonymous
anonymous / SQLyogTunnel.php
Created May 23, 2010 00:50
<?php
/*
SQLyog
Copyright 2003-2006, Webyog
http://www.webyog.com
HTTP Tunneling Page
This page exposes the MySQL API as a set of web-services which is consumed by SQLyog - the most popular GUI to MySQL.
@johndyer
johndyer / cache.php
Created February 9, 2011 03:06
Simple PHP Object Caching
<?php
// Super simple caching class
class PhpCache {
protected $path = null;
protected $duration = null;
function __construct ( $path, $duration = 60) {
$this->path = $path;
$this->duration = $duration;
}
@koenbollen
koenbollen / Screen.cs
Created April 18, 2011 14:43
A simple but complete ScreenManager for XNA.
using Microsoft.Xna.Framework;
using System.Linq;
namespace Screens
{
/// <summary>
/// This is a screen that can be added to the ScreenManager. Extend it and add components
/// to it in the Initialize() method. You can also override the Update() and Draw() method.
/// </summary>
@azproduction
azproduction / LICENSE.txt
Created November 28, 2011 14:03 — forked from 140bytes/LICENSE.txt
A turing machine in 79! bytes of javascript
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@BrockA
BrockA / checkForBadJavascripts.js
Created May 6, 2012 06:11
This is a utility function, meant to be used inside a Greasemonkey script that has the "@run-at document-start" directive set. It Checks for and deletes or replaces specific <script> tags.
/*--- checkForBadJavascripts()
This is a utility function, meant to be used inside a Greasemonkey script that
has the "@run-at document-start" directive set.
It Checks for and deletes or replaces specific <script> tags.
*/
function checkForBadJavascripts (controlArray) {
/*--- Note that this is a self-initializing function. The controlArray
parameter is only active for the FIRST call. After that, it is an
event listener.
@killnine
killnine / Form1.cs
Created September 27, 2012 17:19
Asynchronous TreeView-builder Proof-Of-Concept
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace View
{
public partial class Form1 : Form
{

LogShark is a simple utility to collect logs from an Android device using a PC.

I created this to help Android developers collect information from their app's users. This information can be very useful for debugging purposes.

From Android version 4.1 (Jelly Bean) onwards, it has become difficult to collect this information through the device itself. Hence the need for an app that runs on the PC.

Note that the collection of information is entirely voluntary. Moreover, the user can (and should) review the information before sending it to developers or other people.

Pre-requisites

@enricmcalvo
enricmcalvo / gist:6151178
Last active February 21, 2024 19:53
RDP SSL tunneling

RDP SSL tunneling with stunnel

stunnel utility can be used to tunnel RDP connexions through HTTPS/SSL in order to pass through proxies. It served the same purpose as the Microsoft RDP gateway, but without requirements for Windows Server and licences. I use it for connections to my home PC from work.

General configuration

The 2 sides for the RDP connexion are :

  • The server side :
  • The server is the PC you want to connect to (typically your home PC). Remote connections have to be enabled in the computer properties of that machine, and the local firewall adjusted for corresponding traffic (TCP 3389).
@nylen
nylen / inject.js
Last active December 13, 2021 16:53
JavaScript file to allow injecting scripts into a page using GreaseMonkey/TamperMonkey and running a callback when loading is complete. Based on http://stackoverflow.com/questions/6725272/dynamic-cross-browser-script-loading .
function inject(src, callback) {
if (typeof callback != 'function') callback = function() { };
var el;
if (typeof src != 'function' && /\.css[^\.]*$/.test(src)) {
el = document.createElement('link');
el.type = 'text/css';
el.rel = 'stylesheet';
el.href = src;