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
# Run this in the project repo from the command-line | |
# http://stackoverflow.com/a/4593065/99923 | |
git log --shortstat --author "Xeoncross" --since "2 weeks ago" --until "1 week ago" | grep "files changed" | awk '{files+=$1; inserted+=$4; deleted+=$6} END {print "files changed", files, "lines inserted:", inserted, "lines deleted:", deleted}' |
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 mysql.connector | |
# from mysql.connector import Error | |
# pip3 install mysql-connector | |
# https://dev.mysql.com/doc/connector-python/en/connector-python-reference.html | |
class DB(): | |
def __init__(self, config): | |
self.connection = None | |
self.connection = mysql.connector.connect(**config) |
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 build_calendar($month, $year) { | |
$daysOfWeek = array('S','M','T','W','T','F','S'); | |
$firstDayOfMonth = mktime(0,0,0,$month,1,$year); | |
$numberDays = date('t',$firstDayOfMonth); | |
$dateComponents = getdate($firstDayOfMonth); | |
$monthName = $dateComponents['month']; | |
$dayOfWeek = $dateComponents['wday']; | |
$calendar = "<table class='calendar table table-condensed table-bordered'>"; |
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 ( | |
"bytes" | |
"crypto/ecdsa" | |
"crypto/elliptic" | |
"crypto/rand" | |
"crypto/rsa" | |
"crypto/x509" | |
"crypto/x509/pkix" |
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" | |
"sync" | |
"sync/atomic" | |
) | |
// Fill Channel with int values | |
func fillChan(number int) <-chan int { |
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 ( | |
"bytes" | |
"fmt" | |
"io" | |
"io/ioutil" | |
"log" | |
"mime" | |
"mime/multipart" |
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
# Assuming your have installed the following: | |
# | |
# brew install ufraw imagick ffmpeg | |
# apt-get install ufraw imagick ffmpeg | |
# Convert to JPG's | |
for img in *.CR2; do convert -resize 1920 "$img" "$img.jpg"; print "$img"; done | |
# Make a video |
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 | |
// command line | |
// curl --data "text=foobar" http://localhost:3001/api/decrypt | |
// File sockets | |
function http_request($url, $data, $a = null, $b = null) { | |
$opts = array('http' => | |
array( | |
'method' => 'POST', |
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 ( | |
"encoding/base64" | |
"fmt" | |
"log" | |
"net" | |
"net/mail" | |
"net/smtp" | |
"strings" |
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 ( | |
"context" | |
"io/ioutil" | |
"log" | |
"strings" | |
"testing" | |
"github.com/chromedp/cdproto/dom" |