- OneShallPass - Simple Password manager
- JSON Prettifier
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
// main.c | |
#include <stdio.h> | |
#include <unistd.h> | |
#include <fcntl.h> | |
#include <sys/socket.h> | |
static char buf[5]; | |
int main(int argc, char* argv[]) | |
{ |
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 smtplib | |
from email.MIMEMultipart import MIMEMultipart | |
from email.MIMEBase import MIMEBase | |
from email.MIMEText import MIMEText | |
from email.Utils import COMMASPACE, formatdate | |
from email import Encoders | |
import os | |
def sendMail(to, fro, subject, text, files=[],server="localhost"): | |
assert type(to)==list |
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 ( | |
"flag" | |
"fmt" | |
"net/http" | |
"os" | |
) | |
var addr, dir, prefix string |
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
#-*- coding: utf8 -*- | |
from __future__ import print_function | |
import re | |
def format(tpl, **vars): | |
p = re.compile(r'''\{\{\s*([a-zA-Z0-9_]+?)\s*\}\}''') | |
ret, pos = '', 0 | |
while True: |
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
#-*- coding: utf8 -*- | |
def isPrime(num, ps): | |
for i in ps: | |
if num%i == 0: | |
return False | |
if i**2 > num: | |
break | |
return True |
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
#-*- coding:utf8 -*- | |
from __future__ import print_function | |
import sys | |
import time | |
if sys.version_info < (3,0): | |
range = xrange |
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 <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
#include <assert.h> | |
/* | |
> becomes ++p; | |
< becomes --p; | |
+ becomes ++*p; | |
- becomes --*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
#-*- coding: utf8 -*- | |
''' | |
Examples of advanced Python features: | |
- metaclass | |
- descriptor | |
- generator/forloop | |
''' | |
from __future__ import print_function | |
import sys |
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 <stdio.h> | |
#include <unistd.h> | |
#include <string.h> | |
#include <time.h> | |
#include <stdlib.h> | |
#define MAXLINE 1024 | |
#define DATE_FORMAT "%Y-%m-%d %H:%M:%S" | |
#define GAP_IN_SEC 2 |
NewerOlder