Today I learned
Today I Learned
Today I Learned - Sharing and documenting the things I learn on a daily basis. I share tiny snippets of code here which too small for a blog post but fit here. These are tiny things which make a big difference. Over the time they are lost and documenting them along the way would be beneficial for everyone. Many a times, I also come back to my til, because all the information is ordered and easy to access. Contains a cat gif, because, cats make people happy. Scroll to the bottom, to see the cat gif. :D
For a steady stream of TILs and my other blog posts, checkout my website arshadmehmood.com. To read these tils in a nice, beautiful looking way, read them here on my blog.
122 TILs and counting…
Categories
- Android
- Angular 2+
- C#
- CSS
- Docker
- Firebase
- Git
- Github
- Javascript
- Internet
- JavaScript
- Jekyll
- Nginx
- Node.js
- Other
- PHP
- Programming
- Python
- SQL
- Typescript
- Vue.js
Android
- Circular ImageView with Picasso
- Create Region in Android Studio
- Load data in webView second time
- Show logs from TimingLogger
- String array in XML
Angular 2
- Add dynamic css style properties
- Add a Window Resize event listener for a component
- Add SEO to an Angular App
- Apply two or more pipes
- Bind local method to Dom event listener
- Close Dialog from typescript
- Disable closing the dialog on clicking outside the dialog window in Angular
- Get query parameters
- Hide an element based on window size
- Pass data to routerLink
- Pretty print json object in template
- Select option with default value
- Safe template data binding with ngOnInit
- Send multipart form data with post request
- Specify port for ng serve
- Update Data Model from any component or service using @Input Decorator
- Use div contenteditable property with template model binding
- Using and importing custom font
C#
- Cast or deserialize a Json object to a class
- Create a stream from string
- Create Stream from a Base64 String
- Encode/Decode Base64 string
- LDAP query search filter syntax
- Wait N Seconds without blocking ui
CSS
Docker
Firebase
- Add Cache-Control headers
- Get Firebase Project Name
- Where to find Firebase cloud messaging server API key in firebase console
Git
- Add or link another git repository as a submodule
- Clone without folder
- Delete local branch
- Delete remote branch
- Fix detached submodule head by tracking the right branch
- Ignore local commits and pull repository from the remote branch
- Move commits to a new branch
- Pull changes from the master or other branch
- Remove staged files
- Revert the latest commit
- Undo git pull
Github
- Add a license to an exisiting Github Repository
- Codeblock highlighting programming languages supported by Github
- Get Github Repository size with BASH
JavaScript
- Add an attribute to a json object using spread operator
- Document getElementById check if not null
- Filter a Javascript Array
- Get only unique values from a Javascript Array
- Local Storage
- Remove class name from element
- Remove element from DOM
- Replace everything in a string before a certain point using regex
- Trim/Remove first or last character in Javascript
Jekyll
Nginx
Node.js
Other
- Add current user as the owner of a folder to give write permissions
- Add a new file type to context menu in Windows 10
- Configure and connect Mysql Workbench with SSH connection
- Enable Curl in PHP.ini running on EasyPHP
- List installed packages on Linux
- Take permissions of a folder using sudo on Linux
PHP
- Allow CORS - Cross origin resource sharing
- Compress string or data
- Enable gzip compression
- Fetch MySql column values as array
- Install mbstring on Linux
Programming
Python
- Check if list contains unique elements
- Check if string is numeric
- Check if string is a palindrome
- Combine or merge two pandas Dataframes using a index
- Convert dictionary values or keys to list
- Convert list to dictionary with indexes
- Convert list to string
- Delete key from dictionary
- Docstring for describing functions
- Get a list of dictionary values
- Enumerate list / get index in for loop
- For each loop with index
- Get json from a URL
- Get unique elements from a list
- Get unique elements from a list of lists
- Infinity
- Iterate over dictionary key value pairs
- Iterate over nested lists
- Label plot lines in matplotlib
- Print object to string
- Python null object singleton
- Read json file to pandas Dataframe
- Remove word starting with a specific character
- Replace multiple terms from a string
- Replace URLs using Regex
- Reservoir sampling a list
- Reverse string
- Select columns from a pandas dataframe
- Set difference
- Set intersection
- Shallow copy a dictionary
- Shuffle list
- Sort dictionary by value
- Split dictionary into chunks
- String starts with a list of strings
- Strip non-alphabetical or non-alphanumeric characters in a string
- Trim strings in Python
SQL
- Find all tables with a specific column name
- Return results in json
- Search for a table name in a database
- Select all columns from the joined table and some from the other
- View table schema using SQL
Typescript
Vue.js
- Add dynamic Css Style or Class
- Conditional rendering with if else
- OnClick Event Handling
- Optional parameters in Vue Router
Catz
Inspiration
I shamelessly stole this idea from wajahatkarim3/Today-I-Learned, then I also saw other similar repositories and decided to share my own repo of what I learn everyday.
Contributing
The best way you can contribute is to support the idea of keeping track of things you learned. Just create a public repo and start writing and sharing notes. This is way better than keeping them to yourself.
License
© 2018-2019 Arshad Mehmood
This repository is licensed under the MIT license. See LICENSE
for
details.
Leave a comment