Skip to content

Instantly share code, notes, and snippets.

View muhomerdogu's full-sized avatar
💭
Programmer

OMER DOGU www.omerdogu.com muhomerdogu

💭
Programmer
View GitHub Profile
@clarkngo
clarkngo / plus minus plus plus.rb
Created February 19, 2019 18:33
plus minus plus plus
https://www.codewars.com/kata/plus-minus-plus-plus-dot-dot-dot-count/train/ruby
def catch_sign_change(arr)
count = 0
if arr == []
return count
end
if arr[0] >= 0
previous_sign = "positive"
@nielsutrecht
nielsutrecht / RsaExample.java
Created December 28, 2016 14:13
Example of RSA generation, sign, verify, encryption, decryption and keystores in Java
import javax.crypto.Cipher;
import java.io.InputStream;
import java.security.*;
import java.util.Base64;
import static java.nio.charset.StandardCharsets.UTF_8;
public class RsaExample {
public static KeyPair generateKeyPair() throws Exception {
KeyPairGenerator generator = KeyPairGenerator.getInstance("RSA");
@bg1bgst333
bg1bgst333 / plus.cpp
Created September 6, 2016 03:14
plus#plus
// ヘッダのインクルード
// 既定のヘッダ
#include <iostream> // C++標準入出力
#include <vector> // 動的配列
#include <iterator> // イテレータ
#include <functional> // 標準関数オブジェクト
// 関数のプロトタイプ宣言
void for_each_plus(std::vector<int> &vec1, std::vector<int> &vec2, std::vector<int> &vec3, std::plus<int> &obj); // vec1の各要素とvec2の各要素に関数オブジェクトobjの処理をさせて結果をvec3に格納していく関数.
@dex4er
dex4er / eToken-9.sh
Last active August 2, 2024 15:31
eToken
# udev
wget https://gist.githubusercontent.com/dex4er/1354710/raw/0f9738c7439cdfb9e4446663d137f91ee153b4d8/etc_udev_rules.d_90-hid-eToken.rules
sudo cp etc_udev_rules.d_90-hid-eToken.rules /etc/udev/rules.d
sudo service udev reload
# required packages
sudo apt-get -yy install pcscd opensc
# legacy library
wget http://mirrors.kernel.org/ubuntu/pool/universe/h/hal/libhal1_0.5.14-8_amd64.deb