Skip to content

Instantly share code, notes, and snippets.

View kainio's full-sized avatar
:octocat:
Practicing

Soufiane El Kassib kainio

:octocat:
Practicing
View GitHub Profile
@kainio
kainio / HTML.aspx
Created December 6, 2022 12:03
Search GridView with Paging on TextBox KeyPress using jQuery in ASP.Net
<form id="form1" runat="server">
Search:
<asp:TextBox ID="txtSearch" runat="server" />
<hr />
<asp:ListView ID="lvCustomers" ItemPlaceholderID="itemPlaceHolder1" GroupPlaceholderID="groupPlaceHolder1"
runat="server">
<LayoutTemplate>
<table id="tblCustomers" border="1px" cellpadding="2" cellspacing="2">
<tr>
<th>
@kainio
kainio / HTML.aspx
Created December 6, 2022 12:03
Search GridView with Paging on TextBox KeyPress using jQuery in ASP.Net
<form id="form1" runat="server">
Search:
<asp:TextBox ID="txtSearch" runat="server" />
<hr />
<asp:ListView ID="lvCustomers" ItemPlaceholderID="itemPlaceHolder1" GroupPlaceholderID="groupPlaceHolder1"
runat="server">
<LayoutTemplate>
<table id="tblCustomers" border="1px" cellpadding="2" cellspacing="2">
<tr>
<th>
@kainio
kainio / hangperson_game.rb
Created October 11, 2021 09:24
Hang person game solution
class HangpersonGame
# add the necessary class methods, attributes, etc. here
# to make the tests in spec/hangperson_game_spec.rb pass.
# Get a word from remote "random word" service
# def initialize()
# end
attr_accessor :word, :guesses, :wrong_guesses
@kainio
kainio / pdf2monochome.bash
Created December 16, 2020 19:24
Convert a colored pdf to monchrome
pdf2ps ~/Documents/orchardcore.pdf ~/output-file.ps
gs \
-o ~/output.pdf \
-sDEVICE=pdfwrite \
-c "/setrgbcolor{0 mul 3 1 roll 0 mul 3 1 roll 0 mul 3 1 roll 0 mul add add setgray}def" \
-f ~/output-file.ps
sudo apt-get update
sudo apt-get install -y -qq --no-install-recommends build-essential curl git-core vim passwd unzip cron gcc wget netcat libssl-dev zlib1g-dev libmysqlclient-dev libpq-dev libpq-dev libsqlite3-dev
sudo apt-get install -y --no-install-recommends imagemagick postgresql-client
curl -sL https://deb.nodesource.com/setup_12.x | sudo bash -
sudo apt-get install -y --no-install-recommends nodejs
@kainio
kainio / format-date.c
Last active December 25, 2018 17:53
exercice 18 et 19
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
int main()
{
struct Date {
char jours[2];
int mois;
char annee[4];
@kainio
kainio / excercie_strings_dazi.c
Created December 19, 2018 23:48
Afficher le titre et le nom de l'ulitlisateur comme un message de bienvenu
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
int main()
{
//déclaration des variales de type string
char prenom[20];
char titre[10];
@kainio
kainio / exercice9.c
Created December 19, 2018 22:25 — forked from flpsaad/exercice9.c
titre.prénom.soyez bienvenu
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
int main()
{
char prenom[20];
char titre[10];
printf("entrez votre prenom: ");
@kainio
kainio / N.c
Created December 17, 2018 00:40
For Dazi
#include <stdio.h>
#include <stdlib.h>
int main()
{
int i;
int N = 742;
int centaines = N/100;
int dizaines = N/10 -centaines*10;
@kainio
kainio / cattr_inheritable.rb
Created July 12, 2018 06:39
A Class Instance Variable
module ClassLevelInheritableAttributes
def self.included(base)
base.extend(ClassMethods)
end
module ClassMethods
def cattr_inheritable(*args)
@cattr_inheritable_attrs ||= [:cattr_inheritable_attrs]
@cattr_inheritable_attrs += args
args.each do |arg|