Skip to content

Instantly share code, notes, and snippets.

View Kreijstal's full-sized avatar
↗️

Kreijstal Kreijstal

↗️
View GitHub Profile
@NickNaso
NickNaso / binding.gyp
Created April 27, 2020 13:46
N-API register module (the new way)
{
"targets": [
{
"target_name": "hello",
"sources": [ "hello.cc" ]
}
]
}
@Locoxella
Locoxella / mingw-sshd.sh
Last active May 8, 2024 01:54
Enable sshd on MinGW
#!/bin/bash
#
# Configure sshd on MinGW for Windows
# Create host keys
ssh-keygen -f /etc/ssh/ssh_host_rsa_key -N '' -t rsa
ssh-keygen -f /etc/ssh/ssh_host_dsa_key -N '' -t dsa
ssh-keygen -f /etc/ssh/ssh_host_ecdsa_key -N '' -t ecdsa
ssh-keygen -f /etc/ssh/ssh_host_ed25519_key -N '' -t ed25519
@techedlaksh
techedlaksh / mat_to_csv.py
Created March 21, 2017 23:07
Converting mat files to csv using python, scipy and pandas
import scipy.io
import pandas as pd
mat = scipy.io.loadmat('file.mat')
mat = {k:v for k, v in mat.items() if k[0] != '_'}
data = pd.DataFrame({k: pd.Series(v[0]) for k, v in mat.iteritems()})
data.to_csv("example.csv")
@arendu-zz
arendu-zz / install_stuff.sh
Last active July 27, 2016 18:59
install stuff on aws
sudo apt-get update
sudo apt-get install default-jre
sudo apt-get install default-jdk
@strezh
strezh / QuestaSimNotes.md
Last active June 30, 2024 06:44
QuestaSim notes

Установка под Linux

При установке под линукс (проверено на Ubuntu 16):

  1. Устанавливаем wine
  2. Из папки crack копируем файл MentorKG.exe в <install_dir>/linux (или /linux_x86_64)
  3. Выполняем
sudo chown root:root ~/.wine
@tejainece
tejainece / configure_modelsim.sh
Last active June 30, 2024 06:42
This script installs all the 32 bit library dependencies of modelsim and also compiles freetype.
#!/bin/bash
ALTERA_PATH=~/altera/13.1/
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install gcc-multilib g++-multilib \
lib32z1 lib32stdc++6 lib32gcc1 \
expat:i386 fontconfig:i386 libfreetype6:i386 libexpat1:i386 libc6:i386 libgtk-3-0:i386 \
libcanberra0:i386 libpng12-0:i386 libice6:i386 libsm6:i386 libncurses5:i386 zlib1g:i386 \
@evandrix
evandrix / README.md
Created September 11, 2012 00:06
Headless web browsers

Here are a list of headless browsers that I know about:

  • [HtmlUnit][1] - Java. Custom browser engine. JavaScript support/DOM emulated. Open source.
  • [Ghost][2] - Python only. WebKit-based. Full JavaScript support. Open source.
  • [Twill][3] - Python/command line. Custom browser engine. No JavaScript. Open source.
  • [PhantomJS][4] - Command line/all platforms. WebKit-based. Full JavaScript support. Open source.
  • [Awesomium][5] - C++/.Net/all platforms. Chromium-based. Full JavaScript support. Commercial/free.
  • [SimpleBrowser][6] - .Net 4/C#. Custom browser engine. No JavaScript support. Open source.
  • [ZombieJS][7] - Node.js. Custom browser engine. JavaScript support/emulated DOM. Open source.
  • [EnvJS][8] - JavaScript via Java/Rhino. Custom browser engine. JavaScript support/emulated DOM. Open source.
@tshinnic
tshinnic / httpclnt03.js
Created December 1, 2011 00:40
Example of binding socket for nodejs HTTP client request (for discussion only)
// One shot request HTTP client - show local/remote addresses
//
// Attempt to use a modified Agent that has own self.createConnection()
// that binds the client socket to a particular address.
var assert = require('assert'),
dns = require('dns'),
http = require('http'),
net = require('net'),
util = require('util');