Skip to content

Instantly share code, notes, and snippets.

View windwp's full-sized avatar
💭
I may be slow to respond.

windwp

💭
I may be slow to respond.
  • VietNam
View GitHub Profile
#!/bin/bash
# use AG search with rofi
#
#------------ CONFIG ----------------#
# It support search text in symlink folder so you can add your symlink to this folder
SEARCH_DIRECTORY="$HOME/Desktop"
DIRECTORY_SHORTCUT=(
"~/Downloads"
"~/Documents"
@windwp
windwp / rofi.txt
Created July 16, 2020 01:45
rofi gist
rofi usage:
rofi [-options ...]
Command line only options:
-no-config Do not load configuration, use default values.
-v,-version Print the version number and exit.
-dmenu Start in dmenu mode.
-display [string] X server to contact.
${DISPLAY}
-h,-help This help message.
$margin-list: 0 2 5 10 15 20;
@each $mg in $margin-list {
.mx-#{$mg} {
margin-left: #{$mg}px !important;
margin-right: #{$mg}px !important;
}
.my-#{$mg} {
margin-top: #{$mg}px !important;
import 'package:flutter/material.dart';
class GoodListScreen extends StatefulWidget {
static const routeName = 'GoodListScreen';
GoodListScreen({Key key}) : super(key: key);
_GoodListState createState() => _GoodListState();
}
class _GoodListState extends State<GoodListScreen> {
// truy van 1 truong nao` do' boi? deepPopulate
.deepPopulate('user.business',{populate:{'user' :{select:'displayName profileImageURL business'},'user.business': { select: 'url'}}})
//truy van 1 thanh phan nao` do' trong 1 mang
if( req.query.suburb){
searchQuery.suburbs = {$elemMatch: {name: req.query.suburb, enabled: true}};
}
@windwp
windwp / enum typescript.ts
Created June 1, 2018 03:54
typescript snipplet
export namespace Data11 {
export type PlatformEnum = 'android' | 'ios' | 'windows';
export const PlatformEnum = {
Android: 'android' as PlatformEnum,
Ios: 'ios' as PlatformEnum,
Windows: 'windows' as PlatformEnum
}
}
@windwp
windwp / preload-nolazy.ts
Created May 31, 2018 06:13
preload image angular directive
import { Directive, ElementRef, Input } from '@angular/core';
@Directive({
selector: '[preloadImage]'
})
export class PreloadImage {
private _sourceImage: string;
private _errorImage: string;
private
@Input('preloadImage') set sourceImage(url: string) {
@windwp
windwp / style.css
Created March 15, 2018 03:09
css collection
.center-block {
display: flex;
align-items: center;
}
##Run IIS in folder
"C:\PROGRA~2\IISEXP~1\IISEXP~1.EXE" /path:"F:\workspace\project\web\ShopAdmin\ShopAdmin\ShopAdmin.Web" /port:9090 /clr:v4.0
try {
Regex regexObj = new Regex(@"library/(\d*)", RegexOptions.Multiline);
resultString = regexObj.Match(subjectString).Groups[1].Value;
Console.WriteLine(resultString);
} catch (ArgumentException ex) {
// Syntax error in the regular expression
Console.WriteLine(ex.StackTrace);
}