Skip to content

Instantly share code, notes, and snippets.

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

Surya Prasad Khanal surajkhanal

🏠
Working from home
  • individual
  • Nepal
View GitHub Profile
@Gogotron
Gogotron / boot.asm
Created August 30, 2020 21:53
Making an OS (x86) - Part 2 challenge
mov ah, 0x0e ; initialize ah
mov al, 'a' ; first letter
label: ; enter loop
int 0x10 ; print char
xor al, 32 ; switch from uppercase to lowercase or vice-versa,
inc al ; next letter
mov bl, al ; This checks if the last 5 digits of al are 11010
and bl, 31 ; meaning 26, without modifying it. This is the case
cmp bl, 26 ; for 'Z' and 'z' but not for any other ascii letter.
@ilopX
ilopX / main.dart
Created August 17, 2020 19:21
login
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
void main() {
runApp(MultiProvider(providers: [
ChangeNotifierProvider<AuthProvider>(
create: (_) => AuthProvider(),
),
], child: MyApp()));
}
@jtlapp
jtlapp / futureprovider_example.dart
Created September 18, 2019 04:07
FutureProvider example
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
const appTitle = 'FutureProvider Demo';
@ekka21
ekka21 / gist:3066659
Created July 7, 2012 14:27
Wordpress: Add Extra Media Type Filters to the WordPress Media Manager
function modify_post_mime_types( $post_mime_types ) {
// select the mime type, here: 'application/pdf'
// then we define an array with the label values
$post_mime_types['application/pdf'] = array( __( 'PDFs' ), __( 'Manage PDFs' ), _n_noop( 'PDF <span class="count">(%s)</span>', 'PDFs <span class="count">(%s)</span>' ) );
// then we return the $post_mime_types variable
return $post_mime_types;