Skip to content

Instantly share code, notes, and snippets.

@jgc128
jgc128 / main.cpp
Last active August 29, 2015 14:23
Clicker for the Steam's Monster Summer Game
#include "windows.h"
#include "iostream"
#define INTERVAL_BETWEEN_CLICKS 125
#define CLICK_INTERVAL 50
using namespace std;
inline void mouse_move(LONG x, LONG y)
{
@jgc128
jgc128 / nmf
Last active August 29, 2015 14:08
Non-Negative matrix factorization
{
"metadata": {
"name": "",
"signature": "sha256:cc620a258bec1c319225fa966334f0ce1c92696660fd9982aad2ced2ed69099c"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
@jgc128
jgc128 / sms_spam_1567
Last active August 29, 2015 14:08
timus
#!/usr/bin/python3
from sys import stdin
startChar = ord('a')
endChar = ord('z')
customChars = [['.',',','!'],[' ']]
def createCustomCharsTable():
customCharsTable = {}
{
"metadata": {
"name": "",
"signature": "sha256:e7dfda19c647e9d3dc4e94180c19589cc96dada50b5952a9b5d6c318c26c65e0"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include <string.h>
#include <map>
#include <vector>
#include <set>
#include <algorithm>
#include <iterator>
{
"response":{
"game":[
{
"game_id":1,
"interaction":{
"max":100.0,
"type":"VoteGame",
"id":1,
"min":0.0
@jgc128
jgc128 / var1
Created December 17, 2013 11:02
Nutcracker Android code
if(client != null) {
try {
client.onConnected = new OnConnected() {
public void run(final OrtcClient sender) {
Log.i(LOG_TAG, "connected to " + sender.getUrl());
client.subscribe(notificationChannel, true, new OnMessage() {
public void run(OrtcClient sender, String channel, String message) {
var ret = JObject.Parse(@"{
'response': [{
id: 205387401,
first_name: 'Tom',
last_name: 'Cruise',
sex: 2,
city: '5331',
country: '9'
}]}");
Mock<IApi> mock = new Mock<IApi>();
@jgc128
jgc128 / gist:6468347
Created September 6, 2013 18:57
Mobile services | Top
function insert(item, user, request) {
var topTable = tables.getTable('Leaderboard');
var minItem = topTable.orderBy('Score').take(1).read({
success: function(results) {
if(item.Score > minItem.Score)
{
request.execute();
@jgc128
jgc128 / Client.cs
Created June 23, 2013 18:49
WinRT client
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Windows.Networking;
using Windows.Networking.Sockets;
using Windows.Storage.Streams;
namespace AzalyDC.Common.Networking