I hereby claim:
- I am pczajkowski on github.
- I am pczajkowski (https://keybase.io/pczajkowski) on keybase.
- I have a public key whose fingerprint is 661E A005 5FE5 39D5 5B06 2876 9AF4 CFB6 E475 1A47
To claim this, I am signing this object:
#get time | |
MYTIME=$(date) | |
#get IPs | |
IP=$(/sbin/ip -o -4 addr list | awk '{print $2 ": ", $4}') | |
#remove linebreak | |
IPF=$(echo $IP) | |
#json content | |
post='{"public":false,"files":{"IP.txt":{"content":"'$MYTIME' : '${IPF}'"}}}' | |
#create a command | |
crl="curl --header 'Authorization: bearer YOUR_TOKEN_HERE' --header 'Accept: application/json' --header 'Content-type: application/json' --request POST --data '${post}' https://api.github.com/gists" |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
// Adapted from JavaScript example in The Imposter's Handbook by Rob Conery | |
namespace BellmanFord | |
{ | |
class Path | |
{ |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
// Adapted from JavaScript example in The Imposter's Hanbook by Rob Conery | |
// Doesn't support negative edges! | |
namespace Djikstra | |
{ |
void bubbleSort(int list[], int listLength) { | |
int doItAgain = 0; | |
for (int i = 0; i < listLength; i++) { | |
int thisValue = list[i]; | |
int nextValue = (i + 1 < listLength) ? list[i+1] : INT_MAX; | |
if (nextValue < thisValue) { | |
list[i] = nextValue; | |
list[i+1] = thisValue; |
public static class ReportFactory | |
{ | |
public static IReport<T> CreateReport<T>() | |
{ | |
if (typeof(T) == typeof(OrdersInfoBiWeekly)) | |
return (IReport<T>) new OrdersInfoBiWeekly(); | |
if (typeof(T) == typeof(ContentTypeInfo)) | |
return (IReport<T>) new ContentTypeInfo(); |
private static async Task<List<string>> DownloadTMXsAsync(List<TMInfo> tms) | |
{ | |
List<Task> tasks = new List<Task>(); | |
List<string> tmxs = new List<string>(); | |
foreach (var tm in tms) | |
{ | |
tasks.Add(Task.Run(async () => | |
{ | |
var result = await _memoQTM.DownloadTMXAsync(".", tm.Guid); | |
if (result.status.Equals("ok", StringComparison.InvariantCultureIgnoreCase)) |
public string AppName | |
{ | |
get | |
{ | |
if (!string.IsNullOrEmpty(_appName)) | |
return _appName; | |
var name = System.Diagnostics.Process.GetCurrentProcess().ProcessName; | |
if (string.IsNullOrEmpty(name)) | |
throw new Exception("Can't establish app name!"); |
using System; | |
using System.IO; | |
using System.Linq; | |
using PdfSharp.Pdf; | |
using PdfSharp.Pdf.IO; | |
namespace MergePDFs | |
{ | |
internal class Program | |
{ |
I hereby claim:
To claim this, I am signing this object:
const fs = require('fs'); | |
const cheerio = require('cheerio'); | |
const puppeteer = require('puppeteer'); | |
let app = {}; | |
app.parse = async function(data, elementSelector) { | |
if (data.length === 0) { | |
console.log("No data!"); | |
return; | |
} |