This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// Use IntelliSense to learn about possible attributes. | |
// Hover to view descriptions of existing attributes. | |
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"type": "chrome", | |
"request": "attach", | |
"name": "Attach to Chrome", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import json | |
def contains_ip(line: str): | |
if type(line) is not str: | |
return | |
dots = line.count('.') | |
return dots > 0 and dots % 3 == 0 and len(line) <= 15 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tweepy | |
import time | |
import sys | |
import inspect | |
import requests | |
import json | |
consumer_key = 'xxxxxxxxxxxxxxxxxxx' | |
consumer_secret = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' | |
access_token = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const c = require('crypto'); | |
const utf8 = require('utf8'); | |
const key = 'YOUR_SECRET_KEY'; | |
const region = 'us-east-1'; | |
const date = '11111111'; | |
const service = 'ses'; | |
const terminal = 'aws4_request'; | |
const message = 'SendRawEmail'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.Serializable; | |
import java.lang.reflect.InvocationTargetException; | |
import com.datastax.spark.connector.japi.CassandraRow; | |
import com.datastax.spark.connector.japi.CassandraJavaUtil; | |
import scala.collection.Iterator; | |
class main { | |
public main(CassandraRow row) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Program | |
{ | |
public static void Main(string[] args) | |
{ | |
Console.WriteLine(GetCredential("YOUR_SECRET_KEY")); | |
} | |
private static byte[] sign(byte[] key, string value) | |
{ | |
return new System.Security.Cryptography.HMACSHA256(key).ComputeHash(System.Text.Encoding.UTF8.GetBytes(value)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function measureTextBinaryMethod(context, text, fontface, min, max, desiredWidth) { | |
if (max - min < 1) { | |
return min; | |
} | |
var test = min + ((max - min) / 2); //Find half interval | |
context.font = test + "px " + fontface; | |
measureTest = context.measureText(text).width; | |
if (measureTest > desiredWidth) { | |
var found = measureTextBinaryMethod(context, text, fontface, min, test, desiredWidth) | |
} else { |