Skip to content

Instantly share code, notes, and snippets.

@upzone
upzone / DoSWFUnpacker.java
Created September 21, 2017 09:05 — forked from lvdaqian/DoSWFUnpacker.java
Unpack flash file that was encrypted by DoSWF
package org.ddth.game;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
@upzone
upzone / getter_and_setter.py
Created May 31, 2017 06:33 — forked from luhn/getter_and_setter.py
Using getters and setters with SQLAlchemy
class Table(Base):
id = Column(Integer, primary_key=True)
_name = Column('name', String(24))
@property
def name(self):
return self._name;
@name.setter
def name(self, value):
@upzone
upzone / index.html
Created May 2, 2017 09:35 — forked from triceam/index.html
JavaScript Templating Example to show rendering techniques of JS data in HTML or XML formats.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>JSON Transform</title>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.3.3/underscore-min.js"></script>
<script type="text/javascript" src="https://raw.github.com/douglascrockford/JSON-js/master/json2.js"></script>
<link href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css" rel="stylesheet"></link>
@upzone
upzone / open-firewall-port-80-centos.sh
Created April 14, 2017 03:57 — forked from goyalmohit/open-firewall-port-80-centos.sh
Open firewall for port 80 on CentOS
#this command configure firewall to accept incoming tcp connections on port 80
firewall-cmd --zone=public --permanent --add-port=80/tcp
firewall-cmd --reload
@upzone
upzone / 2repos-sync.sh
Created December 23, 2016 09:42 — forked from yorammi/2repos-sync.sh
Sync 2 remote repositories script - Just define the 3 variables (use export command for that!)
#!/bin/bash
# REPO_NAME=<repo>.git
# ORIGIN_URL=git@<host>:<project>/$REPO_NAME
# REPO1_URL=git@<host>:<project>/$REPO_NAME
rm -rf $REPO_NAME
git clone --bare $ORIGIN_URL
if [ "$?" != "0" ]; then
echo "ERROR: failed clone of $ORIGIN_URL"