Skip to content

Instantly share code, notes, and snippets.

View thecodingcod's full-sized avatar
🏠
Working from home

Mohamed Halawa thecodingcod

🏠
Working from home
View GitHub Profile
@adhipg
adhipg / countries.sql
Created January 12, 2012 11:41
Sql dump of all the Countries, Country Codes, Phone codes.
CREATE TABLE IF NOT EXISTS `country` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`iso` char(2) NOT NULL,
`name` varchar(80) NOT NULL,
`nicename` varchar(80) NOT NULL,
`iso3` char(3) DEFAULT NULL,
`numcode` smallint(6) DEFAULT NULL,
`phonecode` int(5) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
@vitorbritto
vitorbritto / regex.md
Last active June 16, 2024 23:15
Regex Cheat Sheet

Regular Expressions

Basic Syntax

  • /.../: Start and end regex delimiters
  • |: Alternation
  • (): Grouping
@jtyr
jtyr / VirtualBoxKickstart.md
Last active February 23, 2024 01:38
How to use kickstart in VirtualBox

How to use kickstart in VirtualBox

This short howto describes how to install VMs via kickstart in VirtualBox. It's using PXE functionality built into the NAT network mode of the VirtualBox. The following instructions apply to CentOS installation but it should work for any RedHat-based distro.

Prepare directory structure

@leosuncin
leosuncin / README.md
Last active October 12, 2023 18:00
Install Powerline on Debian/Ubuntu
  1. Install pip sudo apt-get install python-pip or wget https://bootstrap.pypa.io/get-pip.py && sudo python get-pip.py
  2. Install powerline sudo pip install powerline-status
  3. Download and install fonts git clone https://github.com/powerline/fonts.git && cd fonts && sh ./install.sh
  4. Add this lines to respective file
    .vimrc

set rtp+=/usr/local/lib/python2.7/dist-packages/powerline/bindings/vim/
> " Always show statusline

@pocari
pocari / wpf_rounded_corner_button_sample.xaml
Last active May 14, 2022 23:42
WPF Rounded Corner Button
<Style x:Key="RoundedButton" TargetType="{x:Type Button}">
<Style.Setters>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border x:Name="button" CornerRadius="5" BorderBrush="Black" BorderThickness="1" Background="Azure">
<TextBlock Text="{TemplateBinding Button.Content}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
@seripap
seripap / months.js
Created October 8, 2015 21:32 — forked from bgadrian/months.js
JavaScript JS month names arrays
var month= ["January","February","March","April","May","June","July",
"August","September","October","November","December"];
var month = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul","Aug", "Sep", "Oct", "Nov", "Dec"];
//used with date.getMonth()
@vasanthk
vasanthk / System Design.md
Last active July 8, 2024 22:11
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@richardtorres314
richardtorres314 / flexbox.scss
Last active June 30, 2024 10:10
CSS Flexbox - Sass Mixins
// --------------------------------------------------
// Flexbox SASS mixins
// The spec: http://www.w3.org/TR/css3-flexbox
// --------------------------------------------------
// Flexbox display
@mixin flexbox {
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
@andreicristianpetcu
andreicristianpetcu / ansible-summary.md
Created May 30, 2016 19:25
This is an ANSIBLE Cheat Sheet from Jon Warbrick

An Ansible summary

Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)

Configuration file

intro_configuration.html

First one found from of

@benhowes
benhowes / info.md
Last active March 22, 2021 12:49
Simple JWT decoder

Gets a JS object which contains the decoded body of the JWT. For now I am pasting this in to postman tests when I need to get JWT decoding

#Important Does not validate the token at all!