Skip to content

Instantly share code, notes, and snippets.

View azhe403's full-sized avatar
😐
On Error Resume Next

Azhe Kun azhe403

😐
On Error Resume Next
View GitHub Profile
@x4ninc
x4ninc / bat
Created March 14, 2018 11:50
cmd disable windows 10
@echo off
title RECODING - xxx x4ninc
color 1f
:LAGI DI CHECK GAN
:-------------------------------------
REM --> Check for permissions
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
REM --> If error flag set, we do not have admin.
@margusmartsepp
margusmartsepp / gist:d9bce523a19d0475017f
Last active June 24, 2018 00:19
C# Dictionary push and pull
public static class Extensions
{
public static bool Push<TKey, TValue>(this Dictionary<TKey, TValue> dictionary, TKey key, TValue value)
{
try
{
if (dictionary.ContainsKey(key))
{
dictionary[key] = value;
}
@niallobrien
niallobrien / gist:3859740
Created October 9, 2012 16:03
Laravel & Bootstrap ajax modal example
// html
<div>This is my post</div>
<!-- Just put this div at the bottom of your template somewhere-->
<!-- Notice that its hidden by default, so if it doesnt get used, thats fine-->
<div class="modal hide"></div>
//JS
$.ajax({
type: 'post', // or post?
/// <summary>
/// 将DataTable数据导入到excel中
/// </summary>
/// <param name="data">要导入的数据</param>
/// <param name="isColumnWritten">DataTable的列名是否要导入</param>
/// <param name="sheetName">要导入的excel的sheet的名称</param>
/// <returns>导入数据行数(包含列名那一行)</returns>
public int DataTableToExcel(DataTable data, string sheetName, bool isColumnWritten)
{
int i = 0;
@lauw
lauw / Business.cs
Last active April 3, 2022 10:39
ReboDb mapping helper to support different casing and default Table/Column attributes
using System.ComponentModel.DataAnnotations.Schema;
namespace UserApi
{
[Table("businesses")]
public class Business
{
[Column("id")]
using System;
using System.Linq;
using System.Reflection;
using Microsoft.Extensions.DependencyInjection;
namespace AutoInject
{
public enum InjectType
{
Singleton,
@brenopolanski
brenopolanski / install-firefox-nightly.md
Created July 30, 2014 00:34
Install Firefox Nightly in Ubuntu via PPA

via: http://www.webupd8.org/2011/05/install-firefox-nightly-from-ubuntu-ppa.html

Add the Mozilla Daily PPA (available for Ubuntu 11.04, 10.10 and 10.04) and install Firefox Nightly using the commands below:

$ [sudo] add-apt-repository ppa:ubuntu-mozilla-daily/ppa
$ [sudo] apt-get update
$ [sudo] apt-get install firefox-trunk

Since this is a daily builds PPA, it's nowhere near stable so use it at your own risk!

@vluzrmos
vluzrmos / compat_l5.php
Last active November 1, 2022 20:43
Lumen L5 compatibility helpers. That file should be added on root path of your project... and added to your composer.json
<?php
if(!function_exists('config_path'))
{
/**
* Return the path to config files
* @param null $path
* @return string
*/
function config_path($path=null)
@whour
whour / Sublime Text Licence Key Build 3156
Created December 12, 2017 02:49 — forked from dr3772/Sublime Text Licence Key Build 3156
Sublime Text Dev Build 3156 Serial Key
----- BEGIN LICENSE -----
eldon
Single User License
EA7E-1122628
C0360740 20724B8A 30420C09 6D7E046F
3F5D5FBB 17EF95DA 2BA7BB27 CCB14947
27A316BE 8BCF4BC0 252FB8FF FD97DF71
B11A1DA9 F7119CA0 31984BB9 7D71700C
2C728BF8 B952E5F5 B941FF64 6D7979DA
B8EB32F8 8D415F8E F16FE657 A35381CC
@fakhrulhilal
fakhrulhilal / dotnet-nodejs.Dockerfile
Created January 16, 2023 08:30
Docker image for .NET with nodejs
FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443
ENV ASPNETCORE_URLS "https://+,http://+"
ENV ASPNETCORE_HTTPS_PORT 443
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
ENV NODE_VERSION 18.x