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
<?php | |
function math_fact($n) { | |
$r = 1; | |
for (; $n > 0; $n--) { | |
$r *= $n; | |
} | |
return $r; | |
} | |
// 8!/(8-2)! == _8 P _2 |
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
#include <iostream> | |
int math_fact(int n) { | |
int r = 1; | |
for (; n > 0; n--) { | |
r *= n; | |
} | |
return r; | |
} |
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
#!/bin/bash | |
echo -n "input SSID: " | |
read wpassid | |
echo -n "input user: " | |
read wpauser | |
echo -n "input password: " | |
read wpapsw | |
wpapsw=`echo -n "$wpapsw" | iconv -t utf16le | openssl md4 -binary | xxd -p` |
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 python2 | |
import nfc | |
def on_connect(tag): | |
print '\n'.join(tag.dump()) | |
with nfc.ContactlessFrontend('usb') as clf: | |
clf.connect(rdwr={'on-connect': on_connect}) |
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 updateStudentId() { | |
var sheet = SpreadsheetApp.getActiveSheet(); | |
var sheetId = sheet.getSheetId(); | |
var range = sheet.getDataRange(); | |
var vals = range.getValues(); | |
var mailColumn; | |
var studentIdColumn; | |
var facultyColumn; | |
var departmentColumn; | |
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
#include <iostream> | |
int hextoint(char hex) { | |
return ('0' <= hex && hex <= '9')? (int)(hex - '0') : | |
('A' <= hex && hex <= 'F')? 10 + (int)(hex - 'A') : | |
('a' <= hex && hex <= 'f')? 10 + (int)(hex - 'a') : | |
-1; | |
} | |
int main(void) { |
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
# Python 3.7 image on Debian stretch for ARMv7 | |
FROM python:3.8-buster | |
WORKDIR /script | |
# Install pipenv | |
RUN pip install --default-timeout=100 pipenv | |
# Set PIPENV_TIMEOUT=1000 to prevent timeout err | |
ENV PIPENV_TIMEOUT 1000 |
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
[[source]] | |
url = "https://pypi.org/simple" | |
verify_ssl = true | |
name = "pypi" | |
[packages] | |
nfcpy = "*" | |
pip = "==18.0" | |
"smbus2" = "*" |
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
[[source]] | |
name = "pypi" | |
url = "https://pypi.org/simple" | |
verify_ssl = true | |
[dev-packages] | |
[packages] | |
gensim = "*" | |
paramiko = "*" |
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
FROM openjdk:11.0.3-jre-slim-stretch | |
RUN apt-get update && apt-get install -y curl | |
RUN curl -o /server.jar https://launcher.mojang.com/v1/objects/f02f4473dbf152c23d7d484952121db0b36698cb/server.jar | |
WORKDIR /minecraft | |
ENTRYPOINT ["/usr/bin/java", "-Xmx1024M", "-Xms1024M", "-jar", "/server.jar"] | |
CMD ["nogui"] |
OlderNewer