Skip to content

Instantly share code, notes, and snippets.

🏋

Artem Golovin awave1

🏋
Block or report user

Report or block awave1

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View AndroidManifest.xml
<activity ...>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<!--
The line below specifies where to display the application.
In the regular application, the value would be "android.intent.category.MAIN"
-->
<category android:name="android.intent.category.INFO"/>
</intent-filter>
</activity>
View of.py
#!/usr/bin/env python2
import struct
pad = 'a' * 96
addr = struct.pack('L', 0xreturn_addr + 50)
nops = '\x90' * 100
shellcode = "copy it here"
print pad + addr + nops + shellcode
View UIColor+HexString.m
// UIColor+HexString.h
#import <UIKit/UIColor.h>
NS_ASSUME_NONNULL_BEGIN
@interface UIColor (HexString)
+ (UIColor *) colorWithHexString: (NSString *) hexString;
+ (CGFloat) colorComponentFrom: (NSString *) string start: (NSUInteger) start length: (NSUInteger) length;
View wtf_are_promises.js
if (!isLoaded()) {
var interval = setInterval(function () {
if (isLoaded()) {
clearInterval(interval);
loaded = true;
$(Event).trigger('loaded');
}
}, 10);
} else {
loaded = true;
View index.html
<body>
<button id="btn">show answers</button>
<script>
var btn = document.getElementById('btn');
var body = document.body;
btn.onclick = function (event) {
body.insertAdjacentHtml('afterend', '<p>some paragraph</p>');
};
</script>
</body>
View network.py
#!/usr/bin/python
"""Create a network and configure IP addresses
This script is intentionally verbose to show you
very simple steps to create and configure a network.
You can modify the scripts to create different topologies.
The network topology created by this script is shown below:
View network.py
#!/usr/bin/python
"""Create a network and configure IP addresses
This script is intentionally verbose to show you
very simple steps to create and configure a network.
You can modify the scripts to create different topologies.
The network topology created by this script is shown below:
View a4.py
import math
import operator
def main():
"""
Description
:raises:
:rtype:
View Graph.cpp
bool Graph::dfs_util(int v, int *colors) {
colors[v] = GRAY;
for (auto *u : n_map[v]->adj) {
if (colors[u->name] == GRAY) {
return true;
} else if (colors[u->name] == WHITE && dfs_util(u->name, colors)) {
return true;
}
}
View downloadpic.py
import urllib.request
import datetime
import os
if not os.path.exists('images/'):
os.makedirs('images/')
def dl_jpg(url, file_path, file_name):
full_path = file_path + file_name + '.jpg'
urllib.request.urlretrieve(url,full_path)
You can’t perform that action at this time.