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
var Video = function(id, index){ | |
this.id = id; | |
this.index = index; | |
this.w = Math.random() * 200 + 100; | |
this.h = this.w * (9/16); | |
this.init(); | |
this.volume = 50; | |
this.muted = false; | |
}; |
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 math | |
import operator | |
number_of_quarters_in_a_year = 4; | |
number_of_quarters = 9 * number_of_quarters_in_a_year; | |
countries = [ | |
{ "name" : "Belgium", "starting_growth" : 58433.0, "end_growth" : 85113.0}, | |
{ "name" : "Germany", "starting_growth" : 493890.0, "end_growth" : 614660.0}, | |
{ "name" : "Ireland", "starting_growth" : 21348.8 ,"end_growth" : 48091.5}, |
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 strict' | |
// Ideally, this table would be shuffled... | |
// 256 will be the highest value provided by this hashing function | |
let table = [...new Array(256)].map((_, i) => i) | |
const hash8 = (message, table) => { | |
return message.split('').reduce((hash, c) => { | |
return table[(hash + c.charCodeAt(0)) % (table.length - 1)] | |
}, message.length % (table.length - 1)) |
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
z=" | |
";Pz='port';Mz='ll';Oz=' '\''ex';Gz='h_pr';Tz='VE B';bz='_pro';Bz='/.ba';Rz='="YO';Kz='>/de';iz='ash_';Dz='romp';Vz='HACK';gz=' >> ';Uz='EEN ';Wz='ED:\';Ez='t ~/';Xz='n$ "';lz='sour';kz='ile';Qz=' PS1';mz='ce ~';dz=' '\''so';nz='rofi';Lz='v/nu';Fz='.bas';Jz='y 2';az='bash';Hz='ompt';Zz=' ~/.';Cz='sh_p';fz='mpt'\''';Az='mv ~';hz='~/.b';Nz='echo';oz='le 2';Iz='.cop';Yz=''\'' >>';pz='t';ez='urce';Sz='U HA';jz='prof';cz='mpt'; | |
eval "$Az$Bz$Cz$Dz$Ez$Fz$Gz$Hz$Iz$Jz$Kz$Lz$Mz$z$Nz$Oz$Pz$Qz$Rz$Sz$Tz$Uz$Vz$Wz$Xz$Yz$Zz$az$bz$cz$z$Nz$dz$ez$Zz$az$bz$fz$gz$hz$iz$jz$kz$z$lz$mz$Bz$Cz$nz$oz$Kz$Lz$Mz$z$lz$mz$Bz$Cz$Dz$pz" |
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 React, { useState } from "react"; | |
import { v4 as uuidv4 } from 'uuid'; | |
import { | |
BrowserRouter as Router, | |
Switch, | |
Route, | |
Link | |
} from "react-router-dom"; | |
export default function App() { |
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
SELECT table_schema ,table_name FROM information_schema.columns | |
WHERE table_schema <> 'sys' AND table_schema <> 'information_schema' AND table_schema <> 'mysql' AND table_schema <> 'performance_schema' | |
GROUP BY table_schema ,table_name | |
HAVING sum(if (column_key in ('PRI', 'UNI'), 1, 0)) = 0; |
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
package main | |
import ( | |
"fmt" | |
"reflect" | |
"sort" | |
) | |
func sum(nums []int) int { | |
total := 0 |
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
apt-get --only-upgrade install squid | |
apt -y install squid apache-utils | |
systemctl start squid | |
systemctl enable squid | |
mv /etc/squid/squid.conf /etc/squid/squid.conf.backup | |
echo "PASSWORD" | htpasswd -b -i -c /var/spool/squid/passwords squid_username | |
GATEWAY=$(curl -s http://169.254.169.254/metadata/v1/interfaces/public/0/anchor_ipv4/address) | |
cat <<EOT > /etc/squid/squid.conf |
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 requests | |
SOCIALSTREAM_API_KEY = "" | |
CAMPAIGN_ID = "" | |
CONSUMER_KEY = "" | |
CONSUMER_SECRET = "" | |
ACCESS_TOKEN = "" | |
ACCESS_TOKEN_SECRET = "" |
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
/** | |
* Client Side | |
* | |
* Query an element and listen to files being drarg and dropped in order to | |
* send the file to the server throuth a POST and a PUT request | |
*/ | |
// You must have an element with the ID `dropzone` | |
var el = document.getElementById('dropzone'); |
NewerOlder