Skip to content

Instantly share code, notes, and snippets.

@Staey24
Staey24 / PY0101EN-3-3-Functions.ipynb
Created Sep 19, 2020
Created on Skills Network Labs
View PY0101EN-3-3-Functions.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View dump_nrf51.rb
#!/usr/bin/env ruby
# Dump firmware from nrf51 and maybe other cortex-m devices
# The script thats missing from http://blog.includesecurity.com/2015/11/NordicSemi-ARM-SoC-Firmware-dumping-technique.html
# Also inspired by https://tasteless.eu/post/2015/12/32c3ctf-emb400/
# Requires seperate instace gdb server already running, for my jlink I use
# openocd -f interface/jlink.cfg -c "adapter_khz 2000; transport select swd;" -f target/nrf51.cfg
# uicr and ficr are always accessible so you might want to dump those externally and compare?
# openocd -f interface/jlink.cfg -c "adapter_khz 2000; transport select swd; set WORKAREASIZE 0;" -f target/nrf51.cfg -c "init; reset halt; flash read_bank 1 uicr-normal.bin 0x0 0x100; exit"
@Alexander-Phan
Alexander-Phan / airlines.csv
Last active Sep 19, 2020
a5 heat map with d3
View airlines.csv
We can't make this file beautiful and searchable because it's too large.
"Airport.Code","Airport.Name","Time.Label","Time.Month","Time.Month Name","Time.Year","Statistics.# of Delays.Carrier","Statistics.# of Delays.Late Aircraft","Statistics.# of Delays.National Aviation System","Statistics.# of Delays.Security","Statistics.# of Delays.Weather","Statistics.Carriers.Names","Statistics.Carriers.Total","Statistics.Flights.Cancelled","Statistics.Flights.Delayed","Statistics.Flights.Diverted","Statistics.Flights.On Time","Statistics.Flights.Total","Statistics.Minutes Delayed.Carrier","Statistics.Minutes Delayed.Late Aircraft","Statistics.Minutes Delayed.National Aviation System","Statistics.Minutes Delayed.Security","Statistics.Minutes Delayed.Total","Statistics.Minutes Delayed.Weather"
View file0
??API??PUGC API?????????????????10????????192????????{_index=logstash-sohutv-basic-api-2020.09.19, _type=_doc, _source={cluster_name=sohutv-basic-server, level=ERROR, appName=core.api-web-mobile.online, my_node_name=tc-196-39, message=getAlbumVideos err:I/O error on GET request for "http://ugc.api-web.online/v2/videos.do": Read timed out; nested exception is java.net.SocketTimeoutException: Read timed out url:http://ugc.api-web.online/v2/videos.do?playlistId=9626236&forceStart=false&customizeSizes=160*90,320*180,240*330&p=1&ps=30&videoId=182616677&src=sohuAppSyncData&_src=partner&_cn=mweb&shareType=1&_sig=91e5ab5c9a87613ab1828ebe749e0258&_ts=1600556805707, @timestamp=2020-09-19T23:06:46.708Z, HOSTNAME=dmo-api-web-mobile-online-tc-zdxn1prl-deploy-7cc48bfbbb-pskwn, thread_name=hystrix-ugc-98, level_value=40000, @version=1, logger_name=com.sohu.tv.api.logic.client.UgcApiClient, my_pod_namespace=sohutv-basic-api, my_pod_name=dmo-api-web-mobile-online-tc-zdxn1prl-deploy-7cc48bfbbb-pskwn, my_pod_ip=10.11.199.45}, _
View file0
??API??PUGC API?????????????????10????????189????????{_index=logstash-sohutv-basic-api-2020.09.19, _type=_doc, _source={cluster_name=sohutv-basic-server, level=ERROR, appName=core.api-web-mobile.online, my_node_name=tc-196-40, message=getAlbumVideos err:I/O error on GET request for "http://ugc.api-web.online/v2/videos.do": timeout; nested exception is java.net.SocketTimeoutException: timeout url:http://ugc.api-web.online/v2/videos.do?playlistId=6754304&forceStart=false&customizeSizes=160*90,320*180,240*330&p=1&ps=30&videoId=68109004&src=sohuAppSyncData&_src=partner&_cn=mweb&shareType=1&_sig=8f964f41f9d5e46e47def7fc6c346729&_ts=1600557050370, @timestamp=2020-09-19T23:10:51.371Z, HOSTNAME=dmo-api-web-mobile-online-tc-zdxn1prl-deploy-7cc48bfbbb-n7vbs, thread_name=hystrix-ugc-95, level_value=40000, @version=1, logger_name=com.sohu.tv.api.logic.client.UgcApiClient, my_pod_namespace=sohutv-basic-api, my_pod_name=dmo-api-web-mobile-online-tc-zdxn1prl-deploy-7cc48bfbbb-n7vbs, my_pod_ip=10.11.197.64}, _id=GWGiqHQBpeHh
@dandrews
dandrews / gist:bfcbd4b861bd7d2b088014da1889a67c
Created Sep 19, 2020 — forked from carolineschnapp/gist:5397337
Sample JavaScript file added with ScriptTag resource. This sample file is meant to teach best practices. Your app will load jQuery if it's not defined. Your app will load jQuery if jQuery is defined but is too old, e.g. < 1.7.
View gist:bfcbd4b861bd7d2b088014da1889a67c
/* Sample JavaScript file added with ScriptTag resource.
This sample file is meant to teach best practices.
Your app will load jQuery if it's not defined.
Your app will load jQuery if jQuery is defined but is too old, e.g. < 1.7.
Your app does not change the definition of $ or jQuery outside the app.
Example: if a Shopify theme uses jQuery 1.4.2, both of these statements run in the console will still return '1.4.2'
once the app is installed, even if the app uses jQuery 1.9.1:
jQuery.fn.jquery => "1.4.2"
$.fn.jquery -> "1.4.2"
*/
View untrusted-lvl15-solution.js
/**************************
* exceptionalCrossing.js *
**************************
*
* Sorry, old friend, but I'm afraid I can't share
* co-authorship on this paper. You've done a very
* good job getting this Algorithm for me. The bit
* with the keys was especially clever! I wouldn't
* have thought of it myself. But then, of course,
* that's why you were here in the first place.
@shizuka-na-kazushi
shizuka-na-kazushi / dog_proxy.js
Created Sep 19, 2020
dog.name プロパティを別の値に置き換えてしまう Proxy !
View dog_proxy.js
// トムという名前を持った犬オブジェクトを生成
var dog = {name: 'トム', age: 1};
// 1. 普通に dog を使う
console.log(`${dog.name}は、${dog.age} 歳の犬です`);
// Proxyに渡すhandler
var handler = {
get: (target, prop, receiver) => {
@salah723
salah723 / PY0101EN-1-2-Strings.ipynb
Created Sep 19, 2020
Created on Skills Network Labs
View PY0101EN-1-2-Strings.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@hylobates-lar
hylobates-lar / merge-sort.js
Created Sep 19, 2020
Ratatouille merge sort
View merge-sort.js
let zucchiniSlices = [20, 11, 25, 3, 14, 5,...]
const merge = (arr1, arr2) => {
let sorted = [];
while (arr1.length && arr2.length) {
if (arr1[0] < arr2[0]) {
sorted.push(arr1.shift());
} else {
sorted.push(arr2.shift());
You can’t perform that action at this time.