Skip to content

Instantly share code, notes, and snippets.

@wb4r
wb4r / albums.json
Last active March 29, 2016 16:35
albums for MusicApp
[
{
"artist": "Tori Kelly",
"title": "Unbreakable Smile",
"url": "https://itunes.apple.com/us/album/unbreakable-smile-bonus-track/id988591612?v0=WWW-NAUS-ITSTOP100-ALBUMS&l=en&ign-mpt=uo%3D4",
"date": "Jun 23, 2015",
"cover": "http://a5.mzstatic.com/us/r30/Music5/v4/83/10/90/83109037-0c67-bf88-a2c5-a022b21de7d7/cover170x170.jpeg",
"price": 12.99
}, {
"artist": "Taylor Swift",
////////////////////////////////////////////////
// 1 -- How Would you print the country of the variable city?
////////////////////////////////////////////////
var city = {name: "London", country: "UK"};
// city.country;
$(function(){ // Data-binding function
$.getJSON('a42580.json',function(d){ // Get details from the JSON file
$('#movie').text(d.title);
$('#screen').text(d.screen);
$('#rating').text(d.rating);
$('#runtime').text(d.runtime);
$('#date').text(d.date);
[0] FIND / GREP
notes-w1.txt
[*] FIND
- Depth
$ find . -maxdepth 1
- Find and then copy (exec)
$ ... -exec cp {} /home/caine/etccopy/ \;
- Size:
c (bytes)
k (kilobytes)
# Original project at https://github.com/psychomario/pyinject
# The project is licensed under the terms of the MIT license; see
# accompanying LICENSE.md for details.
import ctypes
import ctypes.wintypes as wintypes
wintypes.LPTSTR = ctypes.POINTER(ctypes.c_char)
wintypes.LPBYTE = ctypes.POINTER(ctypes.c_ubyte)
wintypes.HANDLE = ctypes.c_void_p
@wb4r
wb4r / dllinject-reduced.py
Last active April 11, 2024 03:00
This script is a reduced version of the original used in www.nordicmelon.com/shell-migration-without-meterpreter ---The original script can be found here => github.com/psychomario/pyinject/blob/master/dllinject.py
# Original project at https://github.com/psychomario/pyinject
# The project is licensed under the terms of the MIT license; see
# accompanying LICENSE.md for details.
import ctypes
import ctypes.wintypes as wintypes
wintypes.LPTSTR = ctypes.POINTER(ctypes.c_char)
wintypes.LPBYTE = ctypes.POINTER(ctypes.c_ubyte)
wintypes.HANDLE = ctypes.c_void_p
[
{
"city": "New York",
"growth_from_2000_to_2013": "4.8%",
"latitude": 40.7127837,
"longitude": -74.0059413,
"population": "8405837",
"rank": "1",
"state": "New York"
},
[
{
"city": "New York",
"growth_from_2000_to_2013": "4.8%",
"latitude": 40.7127837,
"longitude": -74.0059413,
"population": "8405837",
"rank": "1",
"state": "New York"
},
@wb4r
wb4r / web-servers.md
Created November 29, 2017 15:08 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000