Skip to content

Instantly share code, notes, and snippets.

@fraga
fraga / Sleep.py
Last active February 24, 2023 01:22
Sleep.py
import io
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
# Define the input CSV string
csv_string = """timestamp,duration
2022-02-20 23:00:00,420
2022-02-21 00:30:00,300
2022-02-21 07:15:00,360
@fraga
fraga / TelnetServer.cs
Last active December 5, 2022 21:13 — forked from robertripoll/README.md
Telnet Server C#
namespace TelnetServer
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Sockets;
using System.Text;
using System.Threading;
@fraga
fraga / gist:1072137
Created July 8, 2011 15:58
app.config file for .net 4.0 and activating legacy v2 policy
<?xml version="1.0"?>
<configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">"<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>
using Newtonsoft.Json;
using ODataUtility.Microsoft.Dynamics.DataEntities;
using System;
using System.Linq;
using Microsoft.OData.Client;
namespace ODataConsoleApplication
{
class SimpleCRUDExamples
{
# Ikovsky
use_synth :piano
10.times do
play 50, amp: 1, sustain: 0.2, sustain_level: 1
sleep 0.35
play 57, sustain: 0.2
sleep 0.25
play 62, sustain: 0.2
sleep 0.35
@fraga
fraga / get_all_commits_per_user.sh
Last active January 5, 2018 15:34
Git command to count all commits per user on a repo
git log --pretty=format:"%an"| env LC_ALL=C sort| env LC_ALL=C uniq -c| env LC_ALL=C sort -r
@fraga
fraga / gist:1566674
Created January 5, 2012 19:03
Setting up xUnit in VS as external tool
Go to Tools -> External Tools -> Add
Command: Your xunit.console.exe file path
Arguments: $(BinDir)$(TargetName)$(TargetExt)
Initial Directory: $(BinDir)
Change xunit.console.config so that you have requiredRuntime if you want to run .NET 4.0
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
@fraga
fraga / InstallGetPsPoshGit
Created January 3, 2012 22:26
Installing GetPs and Posh-Git
(new-object Net.WebClient).DownloadString("http://psget.net/GetPsGet.ps1") | iex
Install-Module Posh-Git –force

Keybase proof

I hereby claim:

  • I am fraga on github.
  • I am fraga (https://keybase.io/fraga) on keybase.
  • I have a public key whose fingerprint is AA5F 6765 FB77 8496 98CE 8C23 427A 1324 8A7C 5EDC

To claim this, I am signing this object:

Open .gitignore
add the following line
!packages/Microsoft.Bcl.Build*/tools/Microsoft.Bcl.Build.targets
save changes and commit
open up git bash for your repo